fullscreen prompt cookie saving, and more...

This commit is contained in:
legop3
2026-05-19 21:52:03 -04:00
parent 3a2c1bee35
commit 064aaee76c
11 changed files with 183 additions and 186 deletions
+3 -2
View File
@@ -30,9 +30,10 @@ export function SettingsProvider({ children }) {
const setNamespace = useCallback((namespace, updater) => {
setState((prev) => {
const current = prev.data[namespace] || {};
const baseData = prev.status === 'ready' ? prev.data : loadSettings() ?? {};
const current = baseData[namespace] || {};
const nextValue = typeof updater === 'function' ? updater(current) : { ...current, ...(updater ?? {}) };
const nextData = { ...prev.data, [namespace]: nextValue };
const nextData = { ...baseData, [namespace]: nextValue };
const success = saveSettings(nextData);
if (!success) {
return { ...prev, status: 'error' };