Add dedicated bot, workspace and user settings pages

This commit is contained in:
2026-10-19 13:17:17 +01:00
parent 731ea73486
commit 7667f2bc2f
74 changed files with 2183 additions and 358 deletions
+58
View File
@@ -0,0 +1,58 @@
import {
Bot,
CircleAlert,
CpuAi,
Image,
Info,
Layers,
Monitor,
Pencil,
Trash2,
type LucideIcon,
} from "lucide-react";
import type { SettingsRecordKind } from "@/src/utils/parse-settings-record-path";
export type SettingsRecordSection = {
title: string;
url: string;
Icon: LucideIcon;
};
/**
* Where the record rail's back link goes, and the sections it lists.
*/
export const SettingsRecordBack: Record<
SettingsRecordKind,
{ title: string; href: string }
> = {
bots: { title: "All bots", href: "/admin/settings/bots" },
workspaces: { title: "All workspaces", href: "/admin/settings/workspaces" },
users: { title: "All users", href: "/admin/settings/users" },
};
export const SettingsRecordSections: Record<
SettingsRecordKind,
SettingsRecordSection[]
> = {
bots: [
{ title: "Overview", url: "#overview", Icon: Info },
{ title: "Details", url: "#details", Icon: Pencil },
{ title: "Models", url: "#models", Icon: CpuAi },
{ title: "Workspaces", url: "#workspaces", Icon: Layers },
{ title: "Computers", url: "#computers", Icon: Monitor },
{ title: "Delete", url: "#delete", Icon: Trash2 },
],
workspaces: [
{ title: "Picture", url: "#picture", Icon: Image },
{ title: "Details", url: "#details", Icon: Pencil },
{ title: "Bots", url: "#bots", Icon: Bot },
{ title: "Computers", url: "#computers", Icon: Monitor },
{ title: "Models", url: "#models", Icon: CpuAi },
{ title: "Delete", url: "#delete", Icon: Trash2 },
],
users: [
{ title: "Overview", url: "#overview", Icon: Info },
{ title: "Edit", url: "#edit", Icon: Pencil },
{ title: "Danger zone", url: "#danger", Icon: CircleAlert },
],
};