improve styles (#34)

This commit is contained in:
UUBulb
2024-12-06 22:21:50 +08:00
committed by GitHub
parent 2ad96714f3
commit d702996021
2 changed files with 13 additions and 11 deletions

View File

@@ -150,7 +150,7 @@ export const TerminalPage = () => {
<div className="px-8"> <div className="px-8">
<div className="flex mt-6 mb-4"> <div className="flex mt-6 mb-4">
<h1 className="flex-1 text-3xl font-bold tracking-tight"> <h1 className="flex-1 text-3xl font-bold tracking-tight">
Terminal {`Terminal (${id})`}
</h1> </h1>
<div className="flex-2 flex ml-auto gap-2"> <div className="flex-2 flex ml-auto gap-2">
<FMCard id={id} /> <FMCard id={id} />

View File

@@ -33,7 +33,7 @@ export default function ServicePage() {
toast(t("Error"), { toast(t("Error"), {
description: t("Results.ErrorFetchingResource", { error: error.message }), description: t("Results.ErrorFetchingResource", { error: error.message }),
}); });
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, [error]); }, [error]);
const columns: ColumnDef<Service>[] = [ const columns: ColumnDef<Service>[] = [
@@ -43,7 +43,7 @@ export default function ServicePage() {
<Checkbox <Checkbox
checked={ checked={
table.getIsAllPageRowsSelected() || table.getIsAllPageRowsSelected() ||
(table.getIsSomePageRowsSelected() && "indeterminate") (table.getIsSomePageRowsSelected() && "indeterminate")
} }
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)} onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
aria-label="Select all" aria-label="Select all"
@@ -92,12 +92,12 @@ export default function ServicePage() {
<div className="max-w-48 whitespace-normal break-words"> <div className="max-w-48 whitespace-normal break-words">
{(() => { {(() => {
switch (s.cover) { switch (s.cover) {
case 0: { case 0: {
return <span>{t("CoverAll")}</span>; return <span>{t("CoverAll")}</span>;
} }
case 1: { case 1: {
return <span>{t("IgnoreAll")}</span>; return <span>{t("IgnoreAll")}</span>;
} }
} }
})()} })()}
</div> </div>
@@ -106,8 +106,10 @@ export default function ServicePage() {
}, },
{ {
header: t("SpecificServers"), header: t("SpecificServers"),
accessorKey: "skipServers", cell: ({ row }) => {
accessorFn: (row) => Object.keys(row.skip_servers ?? {}), const s = row.original;
return <div className="max-w-32 whitespace-normal break-words">{Object.keys(s.skip_servers ?? {}).join(',')}</div>;
}
}, },
{ {
header: t("Type"), header: t("Type"),