chore: Update dependencies, switch Flutter web renderer to HTML, replace media_kit with video_player/chewie, and remove Hive volume from Docker setup.

This commit is contained in:
Michael committed 2025-12-05 09:52:40 +01:00
1 parent 3c0d472a31
commit 0ca2835cba
16 files changed
+1282 -688

No files matched your search

@@ -40,14 +40,18 @@ class AuthNotifier extends StateNotifier<AuthState> {
try {
final usersBox = HiveService.usersBox;
final passwordHash = HiveService.hashPassword(password);
// Search for user with matching credentials
// Search for user by username
final user = usersBox.values.firstWhere(
(user) => user.username == username && user.passwordHash == passwordHash,
orElse: () => throw Exception('Invalid credentials'),
(user) => user.username == username,
orElse: () => throw Exception('User not found'),
);
// Verify password using salt-based hashing
if (!HiveService.verifyPassword(password, user.passwordHash)) {
throw Exception('Invalid password');
}
state = AuthState(currentUser: user, isLoading: false);
return true;
} catch (e) {
@@ -59,6 +63,7 @@ class AuthNotifier extends StateNotifier<AuthState> {
}
}
/// Logout current user
void logout() {
state = const AuthState();