feat: complete user config management

- Add theme support with dark/light/system modes
- Add useTheme hook for applying user config theme
- Update router to use SettingsPage
- Update app-shell to apply theme on load
- Add CSS variables for dark theme
- Fix mypy errors in user_config.py
- Quality gates pass: ruff, mypy, typecheck, lint, build
This commit is contained in:
Fusion
2026-05-18 15:58:01 +02:00
parent 9f7a750898
commit 94254ee3fd
18 changed files with 463 additions and 171 deletions
+25
View File
@@ -0,0 +1,25 @@
import { apiClient } from "./client";
export interface UserConfig {
default_editor: string | null;
theme: string;
git_user_name: string | null;
git_user_email: string | null;
}
export interface UserConfigUpdate {
default_editor?: string;
theme?: string;
git_user_name?: string;
git_user_email?: string;
}
export const getUserConfig = async (): Promise<UserConfig> => {
const response = await apiClient.get<UserConfig>("/users/me/config");
return response.data;
};
export const updateUserConfig = async (data: UserConfigUpdate): Promise<UserConfig> => {
const response = await apiClient.patch<UserConfig>("/users/me/config", data);
return response.data;
};