feat: add theme system with light/dark mode support

- Add ThemeStore (Zustand) for reactive theme switching
- Add Themes.tsx with THEMES object (defaultLight, defaultDark)
- Add Settings screen with theme switcher and logout button
- Add BaseButton component for reusable themed buttons
- Migrate all components from static currentTheme to useThemeStore()
- Add shadowColor to theme (iOS only, Android uses elevation)
- All text elements now use theme colors (textPrimary, textSecondary, etc.)
- Update tab navigation to include Settings tab
- Move logout from Header to Settings screen
This commit is contained in:
2026-01-24 16:57:33 +01:00
parent 1dbca79edd
commit 43d40b46d7
23 changed files with 450 additions and 236 deletions

View File

@@ -1,4 +1,4 @@
type Theme = {
export type Theme = {
chatBot: string;
primeFg: string;
primeBg: string;
@@ -15,26 +15,46 @@ type Theme = {
textMuted: string;
eventIndicator: string;
borderPrimary: string;
shadowColor: string;
};
const defaultLight: Theme = {
chatBot: "#DE6C20",
primeFg: "#3B3329",
primeBg: "#FFEEDE",
secondaryBg: "#FFFFFF",
messageBorderBg: "#FFFFFF",
placeholderBg: "#D9D9D9",
calenderBg: "#FBD5B2",
confirmButton: "#22c55e",
rejectButton: "#ef4444",
disabledButton: "#ccc",
buttonText: "#000000",
textPrimary: "#000000",
textSecondary: "#666",
textMuted: "#888",
eventIndicator: "#DE6C20",
borderPrimary: "#000000",
};
let currentTheme: Theme = defaultLight;
export default currentTheme;
export const THEMES = {
defaultLight: {
chatBot: "#DE6C20",
primeFg: "#3B3329",
primeBg: "#FFEEDE",
secondaryBg: "#FFFFFF",
messageBorderBg: "#FFFFFF",
placeholderBg: "#D9D9D9",
calenderBg: "#FBD5B2",
confirmButton: "#22c55e",
rejectButton: "#ef4444",
disabledButton: "#ccc",
buttonText: "#000000",
textPrimary: "#000000",
textSecondary: "#666",
textMuted: "#888",
eventIndicator: "#DE6C20",
borderPrimary: "#000000",
shadowColor: "#000000",
},
defaultDark: {
chatBot: "#DE6C20",
primeFg: "#F5E6D3",
primeBg: "#1A1512",
secondaryBg: "#2A2420",
messageBorderBg: "#3A3430",
placeholderBg: "#4A4440",
calenderBg: "#3D2A1A",
confirmButton: "#22c55e",
rejectButton: "#ef4444",
disabledButton: "#555",
buttonText: "#FFFFFF",
textPrimary: "#FFFFFF",
textSecondary: "#AAA",
textMuted: "#777",
eventIndicator: "#DE6C20",
borderPrimary: "#FFFFFF",
shadowColor: "#FFFFFF",
}
} as const satisfies Record<string, Theme>;