feat: Add light/dark mode support with backend persistence

This commit is contained in:
Yunxiao Xu
2026-02-17 00:32:15 -08:00
parent 3881ca6fd8
commit de25dc8a4d
17 changed files with 253 additions and 18 deletions

View File

@@ -9,6 +9,7 @@ export interface UserResponse {
id: string
email: string
display_name?: string
theme_preference: string
}
export const AuthService = {
@@ -49,4 +50,9 @@ export const AuthService = {
async logout() {
await api.post("/auth/logout")
},
async updateTheme(theme: string): Promise<UserResponse> {
const response = await api.patch<UserResponse>("/auth/theme", { theme })
return response.data
},
}