feat(ui): 浅蓝主题、外观设置与圆桌看板主题适配,优化工作区布局

新增 lightblue 主题与外观设置联动,圆桌 Step3 看板/report 统一配色;工作区侧边栏、输入框与轻应用 iframe 主题参数同步更新。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
董宏凯andCursor committed 2026-06-14 12:43:16 +08:00
1 parent 30d4f9667b
commit c702119e66
39 files changed
+2562 -1441

No files matched your search

+35 -4
View File
@@ -10,7 +10,7 @@ import { useTheme as useNextTheme } from 'next-themes';
import { useAppearanceSettings } from '@/core/system-settings/hooks';
// 主题类型
export type ThemeType = 'dark' | 'light';
export type ThemeType = 'dark' | 'light' | 'lightblue';
// 主题配置
export interface ThemeConfig {
@@ -82,6 +82,28 @@ const themes: Record<ThemeType, ThemeConfig> = {
overlay: 'black/30',
},
},
lightblue: {
type: 'lightblue',
name: '浅蓝主题',
colors: {
background: 'white',
backgroundSecondary: 'blue-50',
text: 'gray-800',
textSecondary: 'gray-500',
primary: 'blue-600',
primaryHover: 'blue-500',
border: 'blue-200',
accent: 'blue-700',
success: 'emerald-600',
warning: 'amber-500',
error: 'red-600',
card: 'white',
cardHover: 'blue-50',
input: 'white',
inputBorder: 'blue-200',
overlay: 'black/30',
},
},
};
const STORAGE_KEY = 'strategy-theme';
@@ -97,7 +119,9 @@ function readPersistedTheme(): ThemeType {
return 'light';
}
const saved = localStorage.getItem(STORAGE_KEY);
return saved === 'dark' ? 'dark' : 'light';
if (saved === 'dark') return 'dark';
if (saved === 'lightblue') return 'lightblue';
return 'light';
}
function hasExplicitChoice(): boolean {
@@ -151,7 +175,12 @@ export const ThemeProvider: React.FC<ThemeProviderProps> = ({ children }) => {
const current = localStorage.getItem(STORAGE_KEY);
const legacy = localStorage.getItem('theme');
if (current && current !== 'light' && current !== 'dark') {
if (
current &&
current !== 'light' &&
current !== 'dark' &&
current !== 'lightblue'
) {
// Garbage value — wipe it so the boot-sync below can take over.
localStorage.removeItem(STORAGE_KEY);
}
@@ -185,7 +214,9 @@ export const ThemeProvider: React.FC<ThemeProviderProps> = ({ children }) => {
const theme: ThemeType = mounted
? effectiveTheme === 'dark'
? 'dark'
: 'light'
: effectiveTheme === 'lightblue'
? 'lightblue'
: 'light'
: readPersistedTheme();
useEffect(() => {