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: `
--data-table-library_grid-template-columns: 200px 130px 40px;
height: auto;
max-height: 96%;
max-height: 93%;
overflow-y: scroll;
::-webkit-scrollbar {
display:none;
@@ -484,21 +484,8 @@ const DashboardDevices: FC = () => {
<Grid container justifyContent="space-between">
<Box color="warning.main" ml={1}>
<Typography variant="h6">
{truncate(coreData.devices[deviceIndex].n, 35)}
{truncate(coreData.devices[deviceIndex].n, 31)}
&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>
</Box>
<Grid item justifyContent="flex-end">
@@ -508,6 +495,22 @@ const DashboardDevices: FC = () => {
</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
data={{ nodes: shown_data }}
theme={data_theme}

View File

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