Skip to content

Commit

Permalink
#472 labels fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dendidibe committed Jul 27, 2023
1 parent 82f8953 commit c70fdc9
Showing 1 changed file with 17 additions and 23 deletions.
40 changes: 17 additions & 23 deletions client-web/src/components/AppsTable/AppsTableHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
TableCell,
TableSortLabel,
Tooltip,
Box,
} from "@mui/material";
import InfoIcon from "@mui/icons-material/Info";

Expand All @@ -22,7 +23,6 @@ type TableCellAlign = "inherit" | "left" | "center" | "right" | "justify";
interface HeadCell {
disablePadding: boolean;
id: CellId;
disableSorting: boolean;
label: string;
numeric: boolean;
description?: string;
Expand All @@ -34,15 +34,13 @@ const headCells: readonly HeadCell[] = [
id: "displayName",
numeric: true,
disablePadding: false,
disableSorting: false,
label: "Display Name",
align: "left",
},
{
id: "users",
numeric: true,
disablePadding: false,
disableSorting: false,
label: "Users",
description: "Users registered (total vs 24h)",
align: "center",
Expand All @@ -51,7 +49,7 @@ const headCells: readonly HeadCell[] = [
id: "sessions",
numeric: true,
disablePadding: false,
disableSorting: true,

label: "Sessions",
description: "User sessions (total vs 24h)",
align: "center",
Expand All @@ -60,7 +58,6 @@ const headCells: readonly HeadCell[] = [
id: "chats",
numeric: true,
disablePadding: false,
disableSorting: false,
label: "Chats",
description: "Chat messages (total vs 24h)",
align: "center",
Expand All @@ -69,7 +66,6 @@ const headCells: readonly HeadCell[] = [
id: "api",
numeric: true,
disablePadding: false,
disableSorting: false,
label: "API",
description: "API calls (total vs 24h)",
align: "center",
Expand All @@ -78,7 +74,6 @@ const headCells: readonly HeadCell[] = [
id: "files",
numeric: true,
disablePadding: false,
disableSorting: false,
label: "Files",
description: "Files (total vs 24h)",
align: "center",
Expand All @@ -87,7 +82,6 @@ const headCells: readonly HeadCell[] = [
id: "web3",
numeric: true,
disablePadding: false,
disableSorting: false,
label: "Web3",
description: "Blockchain transactions (total vs 24h)",
align: "center",
Expand All @@ -96,16 +90,16 @@ const headCells: readonly HeadCell[] = [
id: "createdAt",
numeric: true,
disablePadding: false,
disableSorting: true,

label: "Created",
description: "Files (total vs 24h)",
description: "App creation date",
align: "center",
},
{
id: "actions",
numeric: true,
disablePadding: false,
disableSorting: true,

label: "Actions",
align: "right",
},
Expand All @@ -120,18 +114,18 @@ export const AppsTableHead = () => {
align={headCell.align}
padding={headCell.disablePadding ? "none" : "normal"}
>
<TableSortLabel disabled={headCell.disableSorting}>
{headCell.label}
{!!headCell.description && (
<Tooltip title={headCell.description}>
<InfoIcon
color="primary"
fontSize={"small"}
sx={{ marginLeft: 1 }}
/>
</Tooltip>
)}
</TableSortLabel>
<Box style={{display: 'inline-flex', alignItems: 'center'}}>
{headCell.label}
{!!headCell.description && (
<Tooltip title={headCell.description}>
<InfoIcon
color="primary"
fontSize={"small"}
sx={{ marginLeft: 1 }}
/>
</Tooltip>
)}
</Box>
</TableCell>
))}
</TableRow>
Expand Down

0 comments on commit c70fdc9

Please sign in to comment.