table formatting

This commit is contained in:
Proddy
2023-05-11 21:51:15 +02:00
parent 0e0ec7a7c7
commit ff59276387
2 changed files with 19 additions and 16 deletions

View File

@@ -133,7 +133,7 @@ const DashboardDevices: FC = () => {
Table: ` Table: `
--data-table-library_grid-template-columns: 200px 130px 40px; --data-table-library_grid-template-columns: 200px 130px 40px;
height: auto; height: auto;
max-height: 96%; max-height: 93%;
overflow-y: scroll; overflow-y: scroll;
::-webkit-scrollbar { ::-webkit-scrollbar {
display:none; display:none;
@@ -484,21 +484,8 @@ const DashboardDevices: FC = () => {
<Grid container justifyContent="space-between"> <Grid container justifyContent="space-between">
<Box color="warning.main" ml={1}> <Box color="warning.main" ml={1}>
<Typography variant="h6"> <Typography variant="h6">
{truncate(coreData.devices[deviceIndex].n, 35)} {truncate(coreData.devices[deviceIndex].n, 31)}
&nbsp;({shown_data.length}) &nbsp;({shown_data.length})
<IconButton sx={{ ml: 1 }} onClick={() => setShowDeviceInfo(true)}>
<InfoOutlinedIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
</IconButton>
<IconButton onClick={handleDownloadCsv}>
<DownloadIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
</IconButton>
<IconButton onClick={() => setOnlyFav(!onlyFav)}>
{onlyFav ? (
<StarIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
) : (
<StarBorderOutlinedIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
)}
</IconButton>
</Typography> </Typography>
</Box> </Box>
<Grid item justifyContent="flex-end"> <Grid item justifyContent="flex-end">
@@ -508,6 +495,22 @@ const DashboardDevices: FC = () => {
</Grid> </Grid>
</Grid> </Grid>
<Grid>
<IconButton onClick={() => setShowDeviceInfo(true)}>
<InfoOutlinedIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
</IconButton>
<IconButton onClick={handleDownloadCsv}>
<DownloadIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
</IconButton>
<IconButton onClick={() => setOnlyFav(!onlyFav)}>
{onlyFav ? (
<StarIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
) : (
<StarBorderOutlinedIcon color="primary" sx={{ fontSize: 18, verticalAlign: 'middle' }} />
)}
</IconButton>
</Grid>
<Table <Table
data={{ nodes: shown_data }} data={{ nodes: shown_data }}
theme={data_theme} theme={data_theme}

View File

@@ -114,7 +114,7 @@ const DashboarDevicesDialog = ({
onClose={close} onClose={close}
sx={{ sx={{
'& .MuiDialog-paper': { '& .MuiDialog-paper': {
borderRadius: '16px' borderRadius: '12px'
} }
}} }}
> >