Settings page: themes (Dark, Light, Cyberpunk, Retro) with xterm palettes and hub-synced choice, change password, access tokens, about

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