Files
frontend/src/theme/palettes.ts
lafay ba99900624 refactor(WebSocket): migrate from SSE to WebSocket for real-time messaging
- Replaced SSEClient with WSClient for handling real-time messaging.
- Updated ProcessMessageUseCase to initialize WebSocket listeners.
- Refactored messageService to prioritize WebSocket for sending messages, with fallback to HTTP.
- Removed sseService and adjusted imports across the application to utilize wsService.
- Enhanced message handling and connection management for improved performance and reliability.
2026-03-26 22:04:46 +08:00

186 lines
3.8 KiB
TypeScript

/**
* 浅色 / 深色色板与聊天场景语义色
*/
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;