Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.parse.outputs.version }}
flutter_version: ${{ steps.parse.outputs.flutter_version }}
steps:
- uses: actions/checkout@v4
- name: Parse vars.yml
id: parse
run: |
version=$(grep 'name: tk_version' vars.yml -A1 | grep 'value:' | awk '{print $2}')
flutter_version=$(grep 'name: flutter_version' vars.yml -A1 | grep 'value:' | awk '{print $2}')
echo "version=$version" >> "$GITHUB_OUTPUT"
echo "flutter_version=$flutter_version" >> "$GITHUB_OUTPUT"
echo "Version: $version"
echo "Flutter: $flutter_version"

# ── Build Flutter web client ────────────────────────────────────────
build-web-client:
Expand All @@ -41,7 +37,6 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ needs.read-vars.outputs.flutter_version }}
channel: stable
- name: Generate Flutter Icons
working-directory: client
Expand Down Expand Up @@ -187,7 +182,6 @@ jobs:

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ needs.read-vars.outputs.flutter_version }}
channel: stable

# Android needs Java
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ on:
- master

jobs:
read-vars:
name: Read Variables
runs-on: ubuntu-latest
outputs:
flutter_version: ${{ steps.parse.outputs.flutter_version }}
steps:
- uses: actions/checkout@v4
- name: Parse vars.yml
id: parse
run: |
flutter_version=$(grep 'name: flutter_version' vars.yml -A1 | grep 'value:' | awk '{print $2}')
echo "flutter_version=$flutter_version" >> "$GITHUB_OUTPUT"
echo "Flutter: $flutter_version"

protobuf-check:
name: Protobuf Linting
runs-on: ubuntu-latest
Expand Down Expand Up @@ -62,15 +48,13 @@ jobs:
run: cargo clippy --all-targets -- -D warnings

flutter-check:
needs: [read-vars]
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ needs.read-vars.outputs.flutter_version }}
channel: stable
- run: flutter --version
- name: Get dependencies
Expand Down
76 changes: 76 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 34 additions & 14 deletions client/lib/base/app_bar/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:time_keeper/base/app_bar/login_action.dart';
import 'package:time_keeper/base/app_bar/settings_action.dart';
import 'package:time_keeper/base/app_bar/theme_action.dart';
import 'package:time_keeper/colors.dart';
import 'package:time_keeper/providers/auth_provider.dart';
import 'package:time_keeper/providers/health_provider.dart';
import 'package:time_keeper/router/app_routes.dart';

Expand All @@ -32,33 +31,54 @@ class BaseAppBar extends ConsumerWidget implements PreferredSizeWidget {
);
}

final routeName = state.topRoute?.name;
if (routeName != null) {
for (final route in AppRoute.values) {
if (route.name == routeName) {
return Text(
route.name.toUpperCase(),
style: TextStyle(fontWeight: FontWeight.bold),
);
}
}
}

return null;
}

Widget _leading(BuildContext context, String username) {
// Show home button only when not on home page
Widget _leading(BuildContext context) {
final isHomePage = state.matchedLocation == '/';

if (isHomePage) {
return Center(
child: Text(username, style: TextStyle(fontWeight: FontWeight.bold)),
); // Hide button on home page
}

return IconButton(
icon: Icon(Icons.home),
onPressed: () => AppRoute.kiosk.go(context),
return Row(
mainAxisSize: MainAxisSize.min,
children: [
if (!isHomePage)
IconButton(
icon: Icon(Icons.home),
onPressed: () => AppRoute.kiosk.go(context),
),
IconButton(
icon: Icon(Icons.leaderboard),
tooltip: 'Leaderboard',
onPressed: () => AppRoute.leaderboard.go(context),
),
IconButton(
icon: Icon(Icons.calendar_month),
tooltip: 'Calendar',
onPressed: () => AppRoute.calendar.go(context),
),
],
);
}

@override
Widget build(BuildContext context, WidgetRef ref) {
final isConnected = ref.watch(isConnectedProvider).value ?? false;
final username = ref.watch(usernameProvider);

return AppBar(
backgroundColor: isConnected ? null : supportErrorColor,
leading: _leading(context, username ?? ''),
leadingWidth: 120,
leading: _leading(context),
title: _title(isConnected, ref),
actions: _actions(),
);
Expand Down
12 changes: 10 additions & 2 deletions client/lib/base/base_rail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,16 @@ class BaseRail extends HookConsumerWidget {
label: Text('Team'),
),
NavigationRailDestination(
icon: Icon(Icons.help),
label: Text('Help'),
icon: Icon(Icons.event_note),
label: Text('Sessions'),
),
NavigationRailDestination(
icon: Icon(Icons.location_on),
label: Text('Locations'),
),
NavigationRailDestination(
icon: Icon(Icons.analytics),
label: Text('Stats'),
),
],
),
Expand Down
1 change: 1 addition & 0 deletions client/lib/generated/api/api.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export 'location.pb.dart';
export 'schedule.pb.dart';
export 'session.pb.dart';
export 'settings.pb.dart';
export 'stats.pb.dart';
export 'team_member.pb.dart';
export 'user.pb.dart';

Expand Down
1 change: 1 addition & 0 deletions client/lib/generated/api/api.pbenum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export 'location.pbenum.dart';
export 'schedule.pbenum.dart';
export 'session.pbenum.dart';
export 'settings.pbenum.dart';
export 'stats.pbenum.dart';
export 'team_member.pbenum.dart';
export 'user.pbenum.dart';
Loading
Loading