From 02e3fbfc96e08c9285daaa5a6ec53716c747a671 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期五, 29 八月 2025 10:42:18 +0800 Subject: [PATCH] 1 --- zy-acs-flow/src/layout/Logo.jsx | 22 ++++++++++------------ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/zy-acs-flow/src/layout/Logo.jsx b/zy-acs-flow/src/layout/Logo.jsx index a7940df..f3efa10 100644 --- a/zy-acs-flow/src/layout/Logo.jsx +++ b/zy-acs-flow/src/layout/Logo.jsx @@ -1,10 +1,11 @@ import * as React from 'react'; import { useStore } from 'react-admin' import { useTheme } from '@mui/material/styles'; +import { DEFAULT_THEME_NAME } from '@/config/setting'; const Logo = (props) => { const theme = useTheme(); - const [themeName] = useStore('themeName', 'soft'); + const [themeName] = useStore('themeName', DEFAULT_THEME_NAME); const lightLogo = (param) => { return ( @@ -43,23 +44,21 @@ } const getLogo = (themeName, mode) => { - console.log(mode); - switch (themeName) { - case 'rcs': - return mode === 'dark' ? darkLogo() : darkLogo({opacity: 1}); + case DEFAULT_THEME_NAME: + return darkLogo(); case 'soft': - return theme.palette.mode === 'dark' ? darkLogo() : lightLogo({opacity: .7}); + return mode === 'dark' ? darkLogo() : lightLogo({ opacity: .7 }); case 'default': - return theme.palette.mode === 'dark' ? darkLogo() : darkLogo(); + return mode === 'dark' ? darkLogo() : darkLogo(); case 'nano': - return theme.palette.mode === 'dark' ? darkLogo() : lightLogo(); + return mode === 'dark' ? darkLogo() : lightLogo(); case 'radiant': - return theme.palette.mode === 'dark' ? darkLogo() : lightLogo(); + return mode === 'dark' ? darkLogo() : lightLogo(); case 'house': - return theme.palette.mode === 'dark' ? lightLogo() : darkLogo(); + return mode === 'dark' ? lightLogo() : darkLogo(); case 'chiptune': - return theme.palette.mode === 'dark' ? darkLogo() : lightLogo(); + return mode === 'dark' ? darkLogo() : lightLogo(); default: return lightLogo(); } @@ -67,7 +66,6 @@ return ( <div style={{ - // backgroundColor: 'red', display: 'flex', justifyContent: 'center', alignItems: 'center', -- Gitblit v1.9.1