fix: styles

This commit is contained in:
Koosha Lahouti
2025-08-06 14:34:29 -07:00
parent dbbcd0b720
commit f23a8a9fca
3 changed files with 188 additions and 172 deletions

View File

@@ -1,4 +1,10 @@
import { Box, Typography, Button } from '@mui/material'; import {
Box,
Typography,
Button,
useTheme,
useMediaQuery,
} from '@mui/material';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { DeviceMessage, Logout } from 'iconsax-react'; import { DeviceMessage, Logout } from 'iconsax-react';
import Logo from '@/components/Logo'; import Logo from '@/components/Logo';
@@ -38,6 +44,8 @@ export function ActiveDevices() {
current: false, current: false,
}, },
]; ];
const theme = useTheme();
const isXsup = useMediaQuery(theme.breakpoints.up('xs'));
return ( return (
<PageWrapper> <PageWrapper>
@@ -75,6 +83,7 @@ export function ActiveDevices() {
}} }}
> >
{devices.map((device) => ( {devices.map((device) => (
<>
<Box <Box
key={device.id} key={device.id}
sx={{ sx={{
@@ -187,6 +196,10 @@ export function ActiveDevices() {
</Button> </Button>
</Box> </Box>
</Box> </Box>
{isXsup && (
<Box sx={{ color: 'divider', borderBottom: '1px solid' }} />
)}
</>
))} ))}
</Box> </Box>
</CardContainer> </CardContainer>

View File

@@ -46,6 +46,7 @@ export function RecentLogins() {
> >
<Box sx={{ width: '100%', maxWidth: '754px', px: 4 }}> <Box sx={{ width: '100%', maxWidth: '754px', px: 4 }}>
{data.map((d) => ( {data.map((d) => (
<>
<Box <Box
sx={{ sx={{
display: 'flex', display: 'flex',
@@ -115,6 +116,8 @@ export function RecentLogins() {
)} )}
</Box> </Box>
</Box> </Box>
<Box sx={{ color: 'divider', borderBottom: '1px solid' }} />
</>
))} ))}
</Box> </Box>
</Box> </Box>

View File

@@ -69,9 +69,6 @@ export function Layout() {
const location = useLocation(); const location = useLocation();
const { t } = useTranslation('sideMap'); const { t } = useTranslation('sideMap');
const [drawerOpen, setDrawerOpen] = useState(false); const [drawerOpen, setDrawerOpen] = useState(false);
const contentMaxWidth = '100%';
// const contentWidthMd = '810px';
const navWidthMd = '274px'; const navWidthMd = '274px';
const navConfig: NavItemConfig[] = [ const navConfig: NavItemConfig[] = [
@@ -197,13 +194,16 @@ export function Layout() {
> >
<Box <Box
width={{ xs: '100vw', md: 1100 }} width={{ xs: '100vw', md: 1100 }}
height={{ xs: '100vh', md: 800 }} height="100vh"
display="flex" display="flex"
flexDirection="column" flexDirection="column"
bgcolor="background.paper" bgcolor="background.paper"
overflow="hidden" overflow="hidden"
borderRadius={{ xs: 0, md: 2 }} borderRadius={{ xs: 0, md: 2 }}
boxShadow={{ xs: 0, md: 3 }} boxShadow={{ xs: 0, md: 3 }}
sx={{
overflow: 'hidden',
}}
> >
{!isMdUp && ( {!isMdUp && (
<AppBar position="static" elevation={0}> <AppBar position="static" elevation={0}>