mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
switch our dialog with box
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import { useCallback, useMemo, useRef, useState } from 'react';
|
import { useCallback, useMemo, useRef, useState } from 'react';
|
||||||
|
|
||||||
import CancelIcon from '@mui/icons-material/Cancel';
|
import CancelIcon from '@mui/icons-material/Cancel';
|
||||||
import { Box, Button, Dialog, DialogContent, Typography } from '@mui/material';
|
import { Box, Button, Typography } from '@mui/material';
|
||||||
|
|
||||||
import { callAction } from 'api/app';
|
import { callAction } from 'api/app';
|
||||||
import { readSystemStatus } from 'api/system';
|
import { readSystemStatus } from 'api/system';
|
||||||
|
|
||||||
import { dialogStyle } from 'CustomTheme';
|
|
||||||
import { useRequest } from 'alova/client';
|
import { useRequest } from 'alova/client';
|
||||||
import MessageBox from 'components/MessageBox';
|
import MessageBox from 'components/MessageBox';
|
||||||
import { useI18nContext } from 'i18n/i18n-react';
|
import { useI18nContext } from 'i18n/i18n-react';
|
||||||
@@ -95,14 +94,38 @@ const SystemMonitor = () => {
|
|||||||
}, [setSystemStatus]);
|
}, [setSystemStatus]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Box
|
||||||
fullWidth={false}
|
sx={{
|
||||||
maxWidth="sm"
|
position: 'fixed',
|
||||||
sx={{ ...dialogStyle, '& .MuiDialog-paper': { width: '30%' } }}
|
top: 0,
|
||||||
open={true}
|
left: 0,
|
||||||
|
width: '100vw',
|
||||||
|
height: '100vh',
|
||||||
|
display: 'flex',
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
backdropFilter: 'blur(8px)'
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<DialogContent dividers>
|
<Box
|
||||||
<Box m={0} py={0} display="flex" alignItems="center" flexDirection="column">
|
sx={{
|
||||||
|
width: '30%',
|
||||||
|
minWidth: '300px',
|
||||||
|
maxWidth: '500px',
|
||||||
|
backgroundColor: '#393939',
|
||||||
|
border: 3,
|
||||||
|
borderColor: '#565656',
|
||||||
|
borderRadius: '8px',
|
||||||
|
boxShadow: '0 8px 32px rgba(0, 0, 0, 0.3)',
|
||||||
|
p: 3
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box display="flex" alignItems="center" flexDirection="column">
|
||||||
|
<img
|
||||||
|
src="/app/icon.png"
|
||||||
|
alt="EMS-ESP"
|
||||||
|
style={{ width: '40px', height: '40px', marginBottom: '16px' }}
|
||||||
|
/>
|
||||||
<Typography
|
<Typography
|
||||||
color="secondary"
|
color="secondary"
|
||||||
variant="h6"
|
variant="h6"
|
||||||
@@ -138,8 +161,8 @@ const SystemMonitor = () => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</DialogContent>
|
</Box>
|
||||||
</Dialog>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user