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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user