change column order on sites table

This commit is contained in:
miloschwartz
2026-04-25 15:17:39 -07:00
parent 477712b73c
commit 56816c7584
2 changed files with 25 additions and 29 deletions

View File

@@ -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>
);

View File

@@ -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"),