fix: screensaver init timing + gemini key not wiped on settings save
- app.js: move initInactivityWatcher() inside syncSettingsFromDB().then() so it reads screensaver_enabled after server sync, not stale localStorage - app.js: skip gemini_key/bring_password in save_settings POST when empty to avoid overwriting server .env with blank values - api/index.php: add screensaver_enabled to getServerSettings() + saveSettings()
This commit is contained in:
@@ -2077,6 +2077,7 @@ function getServerSettings(): void {
|
||||
'scale_enabled' => env('SCALE_ENABLED', 'false') === 'true',
|
||||
'scale_gateway_url' => env('SCALE_GATEWAY_URL', ''),
|
||||
'meal_plan_enabled' => env('MEAL_PLAN_ENABLED', 'false') === 'true',
|
||||
'screensaver_enabled' => env('SCREENSAVER_ENABLED', 'false') === 'true',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -2122,6 +2123,7 @@ function saveSettings(): void {
|
||||
'pref_zerowaste' => 'PREF_ZEROWASTE',
|
||||
'scale_enabled' => 'SCALE_ENABLED',
|
||||
'meal_plan_enabled' => 'MEAL_PLAN_ENABLED',
|
||||
'screensaver_enabled' => 'SCREENSAVER_ENABLED',
|
||||
];
|
||||
// Integer keys
|
||||
$intMap = [
|
||||
|
||||
Reference in New Issue
Block a user