固定蓝色主题:移除暗黑模式切换、隐藏多语言选择器、默认亮色主题
This commit is contained in:
parent
5a68d88fa9
commit
c2b00265e3
|
|
@ -6,6 +6,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@douyinfe/semi-icons": "^2.63.1",
|
"@douyinfe/semi-icons": "^2.63.1",
|
||||||
"@douyinfe/semi-illustrations": "^2.100.0",
|
"@douyinfe/semi-illustrations": "^2.100.0",
|
||||||
|
"@douyinfe/semi-theme-default": "^2.101.0",
|
||||||
"@douyinfe/semi-ui": "^2.69.1",
|
"@douyinfe/semi-ui": "^2.69.1",
|
||||||
"@lobehub/icons": "^2.0.0",
|
"@lobehub/icons": "^2.0.0",
|
||||||
"@visactor/react-vchart": "~1.8.8",
|
"@visactor/react-vchart": "~1.8.8",
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ const ActionButtons = ({
|
||||||
isMobile,
|
isMobile,
|
||||||
isSelfUseMode,
|
isSelfUseMode,
|
||||||
showThemeToggle = true,
|
showThemeToggle = true,
|
||||||
|
// 默认隐藏顶栏语言选择器,仅保留简体中文
|
||||||
showLanguageSelector = false,
|
showLanguageSelector = false,
|
||||||
logout,
|
logout,
|
||||||
navigate,
|
navigate,
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,7 @@ const PersonalSetting = () => {
|
||||||
onPasskeyDelete={handleRemovePasskey}
|
onPasskeyDelete={handleRemovePasskey}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* 偏好设置(语言等)- 已隐藏 */}
|
{/* 偏好设置(语言等)- 已隐藏:多语言功能屏蔽,统一使用简体中文 */}
|
||||||
{/* <PreferencesSettings t={t} /> */}
|
{/* <PreferencesSettings t={t} /> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,9 @@ const getSystemTheme = () => {
|
||||||
export const ThemeProvider = ({ children }) => {
|
export const ThemeProvider = ({ children }) => {
|
||||||
const [theme, _setTheme] = useState(() => {
|
const [theme, _setTheme] = useState(() => {
|
||||||
try {
|
try {
|
||||||
return localStorage.getItem('theme-mode') || 'auto';
|
return localStorage.getItem('theme-mode-v2') || 'light';
|
||||||
} catch {
|
} catch {
|
||||||
return 'auto';
|
return 'light';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -101,7 +101,7 @@ export const ThemeProvider = ({ children }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
_setTheme(themeValue);
|
_setTheme(themeValue);
|
||||||
localStorage.setItem('theme-mode', themeValue);
|
localStorage.setItem('theme-mode-v2', themeValue);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,9 @@ export const useHeaderBar = ({ onMobileMenuToggle, drawerOpen }) => {
|
||||||
|
|
||||||
const isConsoleRoute = location.pathname.startsWith('/console');
|
const isConsoleRoute = location.pathname.startsWith('/console');
|
||||||
|
|
||||||
// 读取顶栏主题切换和语言选择器开关配置
|
// 读取顶栏主题切换开关,语言选择器已强制关闭(仅保留简体中文)
|
||||||
const showThemeToggle = statusState?.status?.HeaderShowThemeToggle !== false;
|
const showThemeToggle = statusState?.status?.HeaderShowThemeToggle !== false;
|
||||||
|
// 多语言切换已屏蔽,后端 HeaderShowLanguageSelector 开关不再生效
|
||||||
const showLanguageSelector = false;
|
const showLanguageSelector = false;
|
||||||
|
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue