diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-09-15 19:26:21 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-09-15 19:26:21 +0000 |
commit | ad80ac44537ead820808af481cd549104047b111 (patch) | |
tree | 8d8ef249443a1da1f874f2d7a3b2a80ac4d505f4 /frontend/src/pages/System/Status | |
parent | 97ea3a81242f604007fcd54c54f4acf17a97fade (diff) | |
parent | ff54bc83a9dbf07e83b563cd01d52acb165441c7 (diff) | |
download | bazarr-ad80ac44537ead820808af481cd549104047b111.tar.gz bazarr-ad80ac44537ead820808af481cd549104047b111.zip |
Merge development into master
Diffstat (limited to 'frontend/src/pages/System/Status')
-rw-r--r-- | frontend/src/pages/System/Status/index.tsx | 43 | ||||
-rw-r--r-- | frontend/src/pages/System/Status/table.tsx | 37 |
2 files changed, 44 insertions, 36 deletions
diff --git a/frontend/src/pages/System/Status/index.tsx b/frontend/src/pages/System/Status/index.tsx index 49c88ccd4..bcd0e175d 100644 --- a/frontend/src/pages/System/Status/index.tsx +++ b/frontend/src/pages/System/Status/index.tsx @@ -1,15 +1,10 @@ -import { useSystemHealth, useSystemStatus } from "@/apis/hooks"; -import { QueryOverlay } from "@/components/async"; -import { GithubRepoRoot } from "@/constants"; -import { Environment, useInterval } from "@/utilities"; -import { IconDefinition } from "@fortawesome/fontawesome-common-types"; import { - faDiscord, - faGithub, - faWikipediaW, -} from "@fortawesome/free-brands-svg-icons"; -import { faCode, faPaperPlane } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; + FunctionComponent, + PropsWithChildren, + ReactNode, + useCallback, + useState, +} from "react"; import { Anchor, Container, @@ -20,13 +15,18 @@ import { Text, } from "@mantine/core"; import { useDocumentTitle } from "@mantine/hooks"; +import { IconDefinition } from "@fortawesome/fontawesome-common-types"; import { - FunctionComponent, - PropsWithChildren, - ReactNode, - useCallback, - useState, -} from "react"; + faDiscord, + faGithub, + faWikipediaW, +} from "@fortawesome/free-brands-svg-icons"; +import { faCode, faPaperPlane } from "@fortawesome/free-solid-svg-icons"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { useSystemHealth, useSystemStatus } from "@/apis/hooks"; +import { QueryOverlay } from "@/components/async"; +import { GithubRepoRoot } from "@/constants"; +import { Environment, useInterval } from "@/utilities"; import { divisorDay, divisorHour, @@ -46,7 +46,7 @@ function Row(props: InfoProps): JSX.Element { return ( <Grid columns={10}> <Grid.Col span={2}> - <Text size="sm" align="right" weight="bold"> + <Text size="sm" ta="right" fw="bold"> {title} </Text> </Grid.Col> @@ -85,9 +85,12 @@ const InfoContainer: FunctionComponent< return ( <Stack> <Divider - labelProps={{ size: "medium", weight: "bold" }} labelPosition="left" - label={title} + label={ + <Text size="md" fw="bold"> + {title} + </Text> + } ></Divider> {children} <Space /> diff --git a/frontend/src/pages/System/Status/table.tsx b/frontend/src/pages/System/Status/table.tsx index 3b8a87e8a..7dad6757f 100644 --- a/frontend/src/pages/System/Status/table.tsx +++ b/frontend/src/pages/System/Status/table.tsx @@ -1,30 +1,35 @@ -import { SimpleTable } from "@/components"; -import { useTableStyles } from "@/styles"; -import { Text } from "@mantine/core"; import { FunctionComponent, useMemo } from "react"; -import { Column } from "react-table"; +import { Text } from "@mantine/core"; +import { ColumnDef } from "@tanstack/react-table"; +import SimpleTable from "@/components/tables/SimpleTable"; interface Props { - health: readonly System.Health[]; + health: System.Health[]; } const Table: FunctionComponent<Props> = ({ health }) => { - const columns: Column<System.Health>[] = useMemo<Column<System.Health>[]>( + const columns = useMemo<ColumnDef<System.Health>[]>( () => [ { - Header: "Object", - accessor: "object", - Cell: ({ value }) => { - const { classes } = useTableStyles(); - return <Text className={classes.noWrap}>{value}</Text>; + header: "Object", + accessorKey: "object", + cell: ({ + row: { + original: { object }, + }, + }) => { + return <Text className="table-no-wrap">{object}</Text>; }, }, { - Header: "Issue", - accessor: "issue", - Cell: ({ value }) => { - const { classes } = useTableStyles(); - return <Text className={classes.primary}>{value}</Text>; + header: "Issue", + accessorKey: "issue", + cell: ({ + row: { + original: { issue }, + }, + }) => { + return <Text className="table-primary">{issue}</Text>; }, }, ], |