feat(Theme): enhance theming and UI consistency across components
All checks were successful
Frontend CI / build-and-push-web (push) Successful in 8m15s
Frontend CI / ota-android (push) Successful in 10m56s
Frontend CI / build-android-apk (push) Successful in 1h3m22s

- Updated app.json to set userInterfaceStyle to automatic for improved theme adaptability.
- Refactored layout components to utilize useAppColors for dynamic theming, ensuring consistent color usage.
- Introduced SystemChrome component to manage system UI background color based on theme.
- Enhanced TabsLayout, ProfileStackLayout, and other components to leverage new theming structure.
- Improved QRCodeScanner, SearchBar, and CommentItem styles to align with the updated theme system.
- Consolidated styles in SystemMessageItem and TabBar for better maintainability and visual coherence.
This commit is contained in:
lafay
2026-03-25 05:16:54 +08:00
parent 90d834695f
commit 4ee3079b9f
86 changed files with 6777 additions and 5890 deletions

185
src/theme/palettes.ts Normal file
View File

@@ -0,0 +1,185 @@
/**
* 浅色 / 深色色板与聊天场景语义色
*/
export const lightColors = {
primary: {
main: '#FF6B35',
light: '#FFB733',
dark: '#CC8400',
contrast: '#FFFFFF',
},
secondary: {
main: '#4CAF50',
light: '#80E27E',
dark: '#087F23',
},
neutral: {
main: '#6B7280',
light: '#9CA3AF',
dark: '#374151',
bg: '#F3F4F6',
bgDark: '#1F2937',
},
accent: {
main: '#E57373',
light: '#FFCDD2',
dark: '#C62828',
},
background: {
default: '#F5F5F5',
paper: '#FFFFFF',
disabled: '#E0E0E0',
},
text: {
primary: '#212121',
secondary: '#757575',
disabled: '#9E9E9E',
hint: '#BDBDBD',
inverse: '#FFFFFF',
},
divider: '#E0E0E0',
error: {
main: '#F44336',
light: '#FF7961',
dark: '#D32F2F',
},
success: {
main: '#4CAF50',
light: '#80E27E',
dark: '#087F23',
},
warning: {
main: '#FF9800',
light: '#FFB74D',
dark: '#F57C00',
},
info: {
main: '#2196F3',
light: '#64B5F6',
dark: '#1976D2',
},
chat: {
screen: '#F0F2F5',
card: '#FFFFFF',
surfaceRaised: '#F7F8FA',
surfaceMuted: '#F5F7FA',
surfaceInput: '#F5F5F5',
border: '#E8E8E8',
borderLight: '#ECEFF3',
borderHairline: '#F0F0F0',
textPrimary: '#1A1A1A',
textSecondary: '#8E8E93',
textTertiary: '#666666',
textPlaceholder: '#AAAAAA',
textMuted: '#999999',
link: '#4A88C7',
success: '#34C759',
danger: '#FF3B30',
bubbleOutgoing: '#E8E8E8',
bubbleIncoming: '#FFFFFF',
replyTint: '#DFF2FF',
replyTintActive: '#CFEAFF',
replyBorder: '#7FB6E6',
menuHighlight: '#EEF5FC',
iconMuted: '#BBBBBB',
iconSoft: '#C8C8C8',
sheetGrip: '#E0E0E0',
warningBg: '#FFF5F5',
tipBg: '#FFF9E6',
overlayQuote: '#F0F7FF',
shadow: '#000000',
},
} as const;
export type AppColors = typeof lightColors;
export const darkColors = {
primary: {
main: '#FF8A50',
light: '#FFB733',
dark: '#E85D2A',
contrast: '#FFFFFF',
},
secondary: {
main: '#66BB6A',
light: '#81C784',
dark: '#388E3C',
},
neutral: {
main: '#9CA3AF',
light: '#D1D5DB',
dark: '#6B7280',
bg: '#374151',
bgDark: '#111827',
},
accent: {
main: '#EF9A9A',
light: '#FFCDD2',
dark: '#E57373',
},
background: {
default: '#121212',
paper: '#1E1E1E',
disabled: '#2C2C2C',
},
text: {
primary: '#ECECEC',
secondary: '#A8A8A8',
disabled: '#6E6E6E',
hint: '#888888',
inverse: '#121212',
},
divider: '#333333',
error: {
main: '#EF5350',
light: '#FF867C',
dark: '#C62828',
},
success: {
main: '#66BB6A',
light: '#81C784',
dark: '#388E3C',
},
warning: {
main: '#FFA726',
light: '#FFCC80',
dark: '#F57C00',
},
info: {
main: '#42A5F5',
light: '#90CAF9',
dark: '#1976D2',
},
chat: {
screen: '#0A0A0A',
card: '#1C1C1E',
surfaceRaised: '#2C2C2E',
surfaceMuted: '#252528',
surfaceInput: '#2A2A2C',
border: '#38383A',
borderLight: '#3A3A3C',
borderHairline: '#2C2C2E',
textPrimary: '#F2F2F7',
textSecondary: '#98989D',
textTertiary: '#AEAEB2',
textPlaceholder: '#636366',
textMuted: '#8E8E93',
link: '#5AC8FA',
success: '#32D74B',
danger: '#FF453A',
bubbleOutgoing: '#3A3A3C',
bubbleIncoming: '#2C2C2E',
replyTint: '#1A3A52',
replyTintActive: '#224060',
replyBorder: '#4A88C7',
menuHighlight: '#1C2A3A',
iconMuted: '#8E8E93',
iconSoft: '#636366',
sheetGrip: '#48484A',
warningBg: '#3A2222',
tipBg: '#3A3520',
overlayQuote: '#1A2838',
shadow: '#000000',
},
} as unknown as AppColors;