Skip to content

Commit 442f018

Browse files
authored
RFID/Hardware Keyboard listener check in/out & Desktop Kiosk Mode (#7)
* Cleaned up protected routes and stats page * Renamed stats->statistics, added base virtual keyboard listener (rfid) and kiosk mode in settings * Updated rfid check in/out look
1 parent 36006f2 commit 442f018

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1266
-538
lines changed

client/lib/base/base_rail.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class BaseRail extends HookConsumerWidget {
6464
),
6565
NavigationRailDestination(
6666
icon: Icon(Icons.analytics),
67-
label: Text('Stats'),
67+
label: Text('Statistics'),
6868
),
6969
],
7070
),

client/lib/generated/api/api.pb.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export 'location.pb.dart';
2020
export 'schedule.pb.dart';
2121
export 'session.pb.dart';
2222
export 'settings.pb.dart';
23-
export 'stats.pb.dart';
23+
export 'statistics.pb.dart';
2424
export 'team_member.pb.dart';
2525
export 'user.pb.dart';
2626

client/lib/generated/api/api.pbenum.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export 'location.pbenum.dart';
1414
export 'schedule.pbenum.dart';
1515
export 'session.pbenum.dart';
1616
export 'settings.pbenum.dart';
17-
export 'stats.pbenum.dart';
17+
export 'statistics.pbenum.dart';
1818
export 'team_member.pbenum.dart';
1919
export 'user.pbenum.dart';

client/lib/generated/api/stats.pb.dart renamed to client/lib/generated/api/statistics.pb.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a generated file - do not edit.
22
//
3-
// Generated from api/stats.proto.
3+
// Generated from api/statistics.proto.
44

55
// @dart = 3.3
66

client/lib/generated/api/stats.pbenum.dart renamed to client/lib/generated/api/statistics.pbenum.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a generated file - do not edit.
22
//
3-
// Generated from api/stats.proto.
3+
// Generated from api/statistics.proto.
44

55
// @dart = 3.3
66

client/lib/generated/api/stats.pbgrpc.dart renamed to client/lib/generated/api/statistics.pbgrpc.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a generated file - do not edit.
22
//
3-
// Generated from api/stats.proto.
3+
// Generated from api/statistics.proto.
44

55
// @dart = 3.3
66

@@ -16,12 +16,12 @@ import 'dart:core' as $core;
1616
import 'package:grpc/service_api.dart' as $grpc;
1717
import 'package:protobuf/protobuf.dart' as $pb;
1818

19-
import 'stats.pb.dart' as $0;
19+
import 'statistics.pb.dart' as $0;
2020

21-
export 'stats.pb.dart';
21+
export 'statistics.pb.dart';
2222

23-
@$pb.GrpcServiceName('tk.api.StatsService')
24-
class StatsServiceClient extends $grpc.Client {
23+
@$pb.GrpcServiceName('tk.api.StatisticsService')
24+
class StatisticsServiceClient extends $grpc.Client {
2525
/// The hostname for this service.
2626
static const $core.String defaultHost = '';
2727

@@ -30,7 +30,7 @@ class StatsServiceClient extends $grpc.Client {
3030
'',
3131
];
3232

33-
StatsServiceClient(super.channel, {super.options, super.interceptors});
33+
StatisticsServiceClient(super.channel, {super.options, super.interceptors});
3434

3535
$grpc.ResponseFuture<$0.GetLeaderboardResponse> getLeaderboard(
3636
$0.GetLeaderboardRequest request, {
@@ -43,16 +43,16 @@ class StatsServiceClient extends $grpc.Client {
4343

4444
static final _$getLeaderboard =
4545
$grpc.ClientMethod<$0.GetLeaderboardRequest, $0.GetLeaderboardResponse>(
46-
'/tk.api.StatsService/GetLeaderboard',
46+
'/tk.api.StatisticsService/GetLeaderboard',
4747
($0.GetLeaderboardRequest value) => value.writeToBuffer(),
4848
$0.GetLeaderboardResponse.fromBuffer);
4949
}
5050

51-
@$pb.GrpcServiceName('tk.api.StatsService')
52-
abstract class StatsServiceBase extends $grpc.Service {
53-
$core.String get $name => 'tk.api.StatsService';
51+
@$pb.GrpcServiceName('tk.api.StatisticsService')
52+
abstract class StatisticsServiceBase extends $grpc.Service {
53+
$core.String get $name => 'tk.api.StatisticsService';
5454

55-
StatsServiceBase() {
55+
StatisticsServiceBase() {
5656
$addMethod($grpc.ServiceMethod<$0.GetLeaderboardRequest,
5757
$0.GetLeaderboardResponse>(
5858
'GetLeaderboard',

client/lib/generated/api/stats.pbjson.dart renamed to client/lib/generated/api/statistics.pbjson.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is a generated file - do not edit.
22
//
3-
// Generated from api/stats.proto.
3+
// Generated from api/statistics.proto.
44

55
// @dart = 3.3
66

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import 'package:window_manager/window_manager.dart';
2+
3+
bool get isKioskModeSupported => true;
4+
5+
Future<void> enableKioskMode() async {
6+
await windowManager.ensureInitialized();
7+
await windowManager.setFullScreen(true);
8+
await windowManager.setAlwaysOnTop(true);
9+
await windowManager.setPreventClose(true);
10+
}
11+
12+
Future<void> disableKioskMode() async {
13+
await windowManager.ensureInitialized();
14+
await windowManager.setPreventClose(false);
15+
await windowManager.setAlwaysOnTop(false);
16+
await windowManager.setFullScreen(false);
17+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bool get isKioskModeSupported => false;
2+
3+
Future<void> enableKioskMode() async {}
4+
5+
Future<void> disableKioskMode() async {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
bool get isKioskModeSupported => false;
2+
3+
Future<void> enableKioskMode() async {}
4+
5+
Future<void> disableKioskMode() async {}

0 commit comments

Comments
 (0)