Frontend WIP - just websocket support left

This commit is contained in:
2025-02-09 21:23:27 -07:00
parent f73bd53214
commit e7641f6aec
19 changed files with 484 additions and 132 deletions
+4 -2
View File
@@ -8,7 +8,7 @@ final log = Logger('Environment');
bool _isDevEnv = false;
void checkEnvironment(bool isDevEnv) {
void checkEnvironment({required bool isDevEnv}) {
_isDevEnv = isDevEnv;
getJWTSecret();
}
@@ -46,7 +46,9 @@ String? getJWTSecret() {
if (_isDevEnv) {
log.warning('JWT secret not configured. Define JWT_TOKEN_SECRET in environment.');
final secret = List.generate(
24, (_) => String.fromCharCode((65 + Random().nextInt(26)) + (Random().nextInt(2) == 0 ? 0 : 32))).join();
24,
(_) => String.fromCharCode((65 + Random().nextInt(26)) + (Random().nextInt(2) == 0 ? 0 : 32)),
).join();
log.warning('Generated random JWT secret for development: $secret');
return secret;
} else {