mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-03 17:13:33 +00:00
Use status components for true/false things
This commit is contained in:
@@ -116,6 +116,7 @@ const Dashboard = () => {
|
||||
<code>{`Todo:
|
||||
|
||||
- check mobile
|
||||
- use statuses for table formatters where applicable: https://docs.tabler.io/ui/components/statuses
|
||||
- add help docs for host types
|
||||
- REDO SCREENSHOTS in docs folder
|
||||
- search codebase for "TODO"
|
||||
@@ -125,7 +126,6 @@ const Dashboard = () => {
|
||||
|
||||
More for api, then implement here:
|
||||
- Add error message_18n for all backend errors
|
||||
- minor: certificates expand with hosts needs to omit 'is_deleted'
|
||||
- properly wrap all logger.debug called in isDebug check
|
||||
- add new api endpoint changes to swagger docs
|
||||
|
||||
|
||||
@@ -2,7 +2,13 @@ import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-
|
||||
import { createColumnHelper, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
||||
import { useMemo } from "react";
|
||||
import type { DeadHost } from "src/api/backend";
|
||||
import { CertificateFormatter, DomainsFormatter, EmptyData, GravatarFormatter, StatusFormatter } from "src/components";
|
||||
import {
|
||||
CertificateFormatter,
|
||||
DomainsFormatter,
|
||||
EmptyData,
|
||||
GravatarFormatter,
|
||||
TrueFalseFormatter,
|
||||
} from "src/components";
|
||||
import { TableLayout } from "src/components/Table/TableLayout";
|
||||
import { intl, T } from "src/locale";
|
||||
|
||||
@@ -48,7 +54,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
|
||||
id: "enabled",
|
||||
header: intl.formatMessage({ id: "column.status" }),
|
||||
cell: (info: any) => {
|
||||
return <StatusFormatter enabled={info.getValue()} />;
|
||||
return <TrueFalseFormatter value={info.getValue()} trueLabel="online" falseLabel="offline" />;
|
||||
},
|
||||
}),
|
||||
columnHelper.display({
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
DomainsFormatter,
|
||||
EmptyData,
|
||||
GravatarFormatter,
|
||||
StatusFormatter,
|
||||
TrueFalseFormatter,
|
||||
} from "src/components";
|
||||
import { TableLayout } from "src/components/Table/TableLayout";
|
||||
import { intl, T } from "src/locale";
|
||||
@@ -70,7 +70,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
|
||||
id: "enabled",
|
||||
header: intl.formatMessage({ id: "column.status" }),
|
||||
cell: (info: any) => {
|
||||
return <StatusFormatter enabled={info.getValue()} />;
|
||||
return <TrueFalseFormatter value={info.getValue()} trueLabel="online" falseLabel="offline" />;
|
||||
},
|
||||
}),
|
||||
columnHelper.display({
|
||||
|
||||
@@ -2,7 +2,13 @@ import { IconDotsVertical, IconEdit, IconPower, IconTrash } from "@tabler/icons-
|
||||
import { createColumnHelper, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
||||
import { useMemo } from "react";
|
||||
import type { RedirectionHost } from "src/api/backend";
|
||||
import { CertificateFormatter, DomainsFormatter, EmptyData, GravatarFormatter, StatusFormatter } from "src/components";
|
||||
import {
|
||||
CertificateFormatter,
|
||||
DomainsFormatter,
|
||||
EmptyData,
|
||||
GravatarFormatter,
|
||||
TrueFalseFormatter,
|
||||
} from "src/components";
|
||||
import { TableLayout } from "src/components/Table/TableLayout";
|
||||
import { intl, T } from "src/locale";
|
||||
|
||||
@@ -69,7 +75,7 @@ export default function Table({ data, isFetching, onEdit, onDelete, onDisableTog
|
||||
id: "enabled",
|
||||
header: intl.formatMessage({ id: "column.status" }),
|
||||
cell: (info: any) => {
|
||||
return <StatusFormatter enabled={info.getValue()} />;
|
||||
return <TrueFalseFormatter value={info.getValue()} trueLabel="online" falseLabel="offline" />;
|
||||
},
|
||||
}),
|
||||
columnHelper.display({
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
CertificateFormatter,
|
||||
EmptyData,
|
||||
GravatarFormatter,
|
||||
StatusFormatter,
|
||||
TrueFalseFormatter,
|
||||
ValueWithDateFormatter,
|
||||
} from "src/components";
|
||||
import { TableLayout } from "src/components/Table/TableLayout";
|
||||
@@ -83,7 +83,7 @@ export default function Table({ data, isFetching, isFiltered, onEdit, onDelete,
|
||||
id: "enabled",
|
||||
header: intl.formatMessage({ id: "column.status" }),
|
||||
cell: (info: any) => {
|
||||
return <StatusFormatter enabled={info.getValue()} />;
|
||||
return <TrueFalseFormatter value={info.getValue()} trueLabel="online" falseLabel="offline" />;
|
||||
},
|
||||
}),
|
||||
columnHelper.display({
|
||||
|
||||
@@ -5,9 +5,9 @@ import type { User } from "src/api/backend";
|
||||
import {
|
||||
EmailFormatter,
|
||||
EmptyData,
|
||||
EnabledFormatter,
|
||||
GravatarFormatter,
|
||||
RolesFormatter,
|
||||
TrueFalseFormatter,
|
||||
ValueWithDateFormatter,
|
||||
} from "src/components";
|
||||
import { TableLayout } from "src/components/Table/TableLayout";
|
||||
@@ -83,7 +83,7 @@ export default function Table({
|
||||
id: "isDisabled",
|
||||
header: intl.formatMessage({ id: "column.status" }),
|
||||
cell: (info: any) => {
|
||||
return <EnabledFormatter enabled={!info.getValue()} />;
|
||||
return <TrueFalseFormatter value={!info.getValue()} />;
|
||||
},
|
||||
}),
|
||||
columnHelper.display({
|
||||
|
||||
Reference in New Issue
Block a user