mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-07 04:47:08 +00:00
change column order on sites table
This commit is contained in:
@@ -431,9 +431,6 @@ export default function SiteResourcesOverview({
|
||||
);
|
||||
}
|
||||
|
||||
/** Left column = whichever side has a greater total; ties default to public first. */
|
||||
const publicOnLeft = publicTotal >= privateTotal;
|
||||
|
||||
const publicColumn = (
|
||||
<OverviewColumn
|
||||
key="public"
|
||||
@@ -471,9 +468,8 @@ export default function SiteResourcesOverview({
|
||||
return (
|
||||
<SettingsContainer>
|
||||
<div className="grid gap-6 md:grid-cols-2">
|
||||
{publicOnLeft
|
||||
? [publicColumn, privateColumn]
|
||||
: [privateColumn, publicColumn]}
|
||||
{publicColumn}
|
||||
{privateColumn}
|
||||
</div>
|
||||
</SettingsContainer>
|
||||
);
|
||||
|
||||
@@ -307,29 +307,6 @@ export default function SitesTable({
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "resources",
|
||||
accessorKey: "resourceCount",
|
||||
friendlyName: t("resources"),
|
||||
header: () => <span className="p-3">{t("resources")}</span>,
|
||||
cell: ({ row }) => {
|
||||
const siteRow = row.original;
|
||||
return (
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => setResourcesDialogSite(siteRow)}
|
||||
className="flex h-8 items-center gap-2 px-0 font-normal"
|
||||
>
|
||||
<span className="text-sm tabular-nums">
|
||||
{siteRow.resourceCount} {t("resources")}
|
||||
</span>
|
||||
<ChevronDown className="h-3 w-3 shrink-0" />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorKey: "type",
|
||||
friendlyName: t("type"),
|
||||
@@ -376,6 +353,29 @@ export default function SitesTable({
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "resources",
|
||||
accessorKey: "resourceCount",
|
||||
friendlyName: t("resources"),
|
||||
header: () => <span className="p-3">{t("resources")}</span>,
|
||||
cell: ({ row }) => {
|
||||
const siteRow = row.original;
|
||||
return (
|
||||
<Button
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onClick={() => setResourcesDialogSite(siteRow)}
|
||||
className="flex h-8 items-center gap-2 px-0 font-normal"
|
||||
>
|
||||
<span className="text-sm tabular-nums">
|
||||
{siteRow.resourceCount} {t("resources")}
|
||||
</span>
|
||||
<ChevronDown className="h-3 w-3 shrink-0" />
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
accessorKey: "exitNode",
|
||||
friendlyName: t("exitNode"),
|
||||
|
||||
Reference in New Issue
Block a user