Add computer settings pages and restore workspace pages

This commit is contained in:
2026-10-19 13:30:02 +01:00
parent 7667f2bc2f
commit 7b1ccfeb62
36 changed files with 1082 additions and 131 deletions
@@ -14,6 +14,11 @@ describe("parseSettingsRecordPath", () => {
expect(
parseSettingsRecordPath({ pathname: "/admin/settings/users/8" }),
).toEqual({ kind: "users", id: "8" });
expect(
parseSettingsRecordPath({
pathname: "/admin/settings/computers/2",
}),
).toEqual({ kind: "computers", id: "2" });
});
test("ignores settings list pages and other paths", () => {
+8 -2
View File
@@ -1,4 +1,8 @@
export type SettingsRecordKind = "bots" | "workspaces" | "users";
export type SettingsRecordKind =
| "bots"
| "workspaces"
| "users"
| "computers";
export type SettingsRecordPath = {
kind: SettingsRecordKind;
@@ -21,7 +25,9 @@ export default function parseSettingsRecordPath({
const match = pathname
.replace(/\/$/, "")
.match(/^\/admin\/settings\/(bots|workspaces|users)\/([^/]+)$/);
.match(
/^\/admin\/settings\/(bots|workspaces|users|computers)\/([^/]+)$/,
);
if (!match) return null;