Add theme system with color presets, fix login page styling, persist auth session

Theme system with 5 color presets (Slate, Emerald, Violet, Amber, Rose)
and light/dark/system mode. User menu in sidebar with theme picker and
sign out. Login page uses standalone dark branded styling with autofill
override. Auth persists in sessionStorage across refreshes.
This commit is contained in:
Ryan Moon
2026-03-28 08:30:24 -05:00
parent 9abdf6c050
commit 7c64a928e1
10 changed files with 691 additions and 145 deletions

View File

@@ -31,7 +31,8 @@ async function request<T>(method: string, path: string, body?: unknown): Promise
if (res.status === 401) {
useAuthStore.getState().logout()
window.location.href = '/login'
// Don't use window.location — that causes a full reload and flash
// The router's beforeLoad guard will redirect to /login on next navigation
throw new ApiError('Unauthorized', 401)
}