Global refresh rate in Settings drives every live view and each machine's sampler; per-page pickers removed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-18 13:27:13 -07:00
co-authored by Claude Fable 5.1
parent a4f39859b6
commit bbf0f2580f
11 changed files with 92 additions and 32 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ import { api, Me, Unauthenticated } from './api'
import Login from './Login'
import Shell from './Shell'
import { applyTheme, currentThemeId } from './themes'
import { getRefreshMs, setRefreshMs } from './prefs'
export default function App() {
const [me, setMe] = useState<Me | null | undefined>(undefined)
@@ -10,7 +11,10 @@ export default function App() {
const refresh = useCallback(async () => {
try {
const m = await api.meHere(); setMe(m)
api.uiPrefs().then((p) => { if (p.theme && p.theme !== currentThemeId()) applyTheme(p.theme) }).catch(() => { /* keep local */ })
api.uiPrefs().then((p) => {
if (p.theme && p.theme !== currentThemeId()) applyTheme(p.theme)
if (p.refreshMs && p.refreshMs !== getRefreshMs()) setRefreshMs(p.refreshMs)
}).catch(() => { /* keep local */ })
} catch (e) { if (e instanceof Unauthenticated) setMe(null) }
}, [])