From a19b70e1af79238c298ef8af6d0265bf6a22c92d Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期五, 07 二月 2025 16:15:50 +0800
Subject: [PATCH] #

---
 rsf-admin/src/page/login/index.jsx |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/rsf-admin/src/page/login/index.jsx b/rsf-admin/src/page/login/index.jsx
index 5c56eaf..49f801c 100644
--- a/rsf-admin/src/page/login/index.jsx
+++ b/rsf-admin/src/page/login/index.jsx
@@ -8,6 +8,8 @@
     Typography,
     Tabs,
     Tab,
+    useTheme,
+    useMediaQuery,
 } from '@mui/material';
 import {
     useTranslate,
@@ -21,9 +23,13 @@
 
 const Index = () => {
     const translate = useTranslate();
+    const theme = useTheme();
+    const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
 
     const [tab, setTab] = useState(0)
     const [tenantList, setTenantList] = useState([]);
+
+    const formPosition = isSmallScreen ? 'middle' : 'right'
 
     useEffect(() => {
         tenants().then(data => {
@@ -31,20 +37,20 @@
         })
     }, []);
 
+
     return (
         <Box
             sx={{
                 display: 'flex',
                 flexDirection: 'column',
                 minHeight: '100vh',
-                alignItems: 'center',
-                justifyContent: 'flex-start',
-                // justifyContent: 'center',
+                alignItems: formPosition === 'middle' ? 'center' : 'flex-end',
+                paddingRight: formPosition === 'middle' ? 0 : '6em',
+                justifyContent: formPosition === 'middle' ? 'flex-start' : 'center',
                 background: `url(/login_bg.jpg)`, // https://unsplash.com/
                 backgroundRepeat: 'no-repeat',
                 backgroundSize: 'cover',
-            }
-            }
+            }}
         >
             <video
                 autoPlay
@@ -70,7 +76,7 @@
 
             <Card sx={{
                 width: 400,
-                marginTop: '6em',
+                marginTop: formPosition === 'middle' ? '6em' : 0,
                 zIndex: 1
             }}>
                 <div>
@@ -98,7 +104,7 @@
                 {tab === 1 && <Register tenantList={tenantList} />}
 
                 <Box mt={1} mb={1} sx={{ textAlign: 'center' }}>
-                    <Typography variant="caption" align="center">rsf - sever</Typography>
+                    <Typography variant="caption" align="center">Footer Goes Here</Typography>
                 </Box>
             </Card>
         </Box >

--
Gitblit v1.9.1