From 52add26905c08d7d9caee76a746eb50c9b199fe0 Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 29 Apr 2025 18:19:53 +0800 Subject: [PATCH] style: login background --- src/assets/images/grid_background_1920x1080.png | Bin 11246 -> 0 bytes src/global.less | 2 +- src/pages/login/index.tsx | 14 ++++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 src/assets/images/grid_background_1920x1080.png diff --git a/src/assets/images/grid_background_1920x1080.png b/src/assets/images/grid_background_1920x1080.png deleted file mode 100644 index e645264f3ac821273e3e87e33caf5d81ea878852..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11246 zcmeAS@N?(olHy`uVBq!ia0y~yU~gbxV6os}1B$%3e9)PJL3^vGi(^Q|oVRxlcItSF zupE4odPT$6tKQXX!q4f~5~QrI844>@3b?n|-2MKy8mJ8fe%$|U`Fzgv%6+x$`PWNt zCU@9wyOG>Y6j4*v|KIML5X2mYcvS{w2-Ah*08~tn$pFG~Xkp-iumluGl>tLyG(aH9 zVKjw+!(m{u%$|3@|NZ?Y2#E=XKX=btKDRml`K@)u?scc-oZoCbDi=)@@$_=_4<;#y zF$zu$pb`lPIs_URAuJ`91PG&ngHZy)8dU}khtU9mB!|%y0uG0P$ubqd=D_c_%8-~~ z__2F_@wv)*&u^E1D2ttL+eU0_;70Q4<=;QBnm~*ht=}NwFj~KX!(m|Rx6yVeDDa7G zaev(P{`dFW?vQlL@S)uP`JB%-=eNIq@OGD8HP6Q5V%0fB5!3wNKjhAU7&BVGLBe6Q zeglWYz|?P}?NCtQ6Wii`RC@pW`|bUZbj$GIecd_B=auvF?;pHf8v9KmsbBZo4dRIT z_YR9+fEqJe4T1w=v>F5l1F<#I=ui0TfWGA8k2;LVzr{K|cC^#5MZ-=h`y{~?MEeoU=V5t9Ie9rRx=bGPq_tw4M zbXq`x-_k2uAC-(YYaDULv+nK4_YRao=nI*Zt;z76bp@J)cuN@A=Pf zvU_5$r}irnJ2LR?#;2FIHH^FvV@7*};BXk2Zr*6S037(E?E-Kx5Zf*oT{tk{9kbDu z6yOv)z}@4K9Sfri2N)QLEiy;vqCxp}w5vd$@? F2>{LWbW8vM diff --git a/src/global.less b/src/global.less index eb0dd024..be52d584 100644 --- a/src/global.less +++ b/src/global.less @@ -94,7 +94,7 @@ html[data-theme='realDark'] { --color-bg-tooltip: #424242; --color-editor-header-bg: #292929; --color-progress-text: rgba(255, 255, 255, 80%); - --color-modal-content-bg: #080808; + --color-modal-content-bg: #1f1f1f; background: #141414; diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index df9cfc18..afd4e82b 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -1,5 +1,5 @@ import Bg2 from '@/assets/images/bg-2.png'; -import GridBg from '@/assets/images/grid_background_1920x1080.png'; +import GridBg from '@/assets/images/noise-bg.svg'; import { userAtom } from '@/atoms/user'; import Footer from '@/components/footer'; import useUserSettings from '@/hooks/use-user-settings'; @@ -22,8 +22,10 @@ const Wrapper = styled.div<{ $isDarkTheme: boolean }>` z-index: -1; background: ${({ $isDarkTheme }) => $isDarkTheme - ? `url(${GridBg}) center center /cover no-repeat` - : `url(${Bg2}) center center /cover no-repeat`}; + ? `url(${GridBg}) center center no-repeat` + : `url(${Bg2}) center center no-repeat`}; + background-size: ${({ $isDarkTheme }) => + $isDarkTheme ? '100% 100%' : 'cover'}; opacity: ${({ $isDarkTheme }) => ($isDarkTheme ? 1 : 0.6)}; `; @@ -42,7 +44,7 @@ const FormWrapper = styled.div` height: max-content; padding: 32px; background-color: var(--color-modal-content-bg); - + box-shadow: var(--ant-box-shadow-secondary); .field-wrapper { background-color: transparent !important; } @@ -64,8 +66,8 @@ const Login = () => { checkDefaultPage(userInfo, true); if (!initialState?.currentUser) { - setInitialState((s: any) => ({ - ...s, + setInitialState((preState: any) => ({ + ...preState, currentUser: userInfo })); }