From 5e061c58e3ea64b5f17cb48e4e6fbafd60858a8c Mon Sep 17 00:00:00 2001 From: Adeel Ahmad Date: Thu, 15 Oct 2026 10:15:10 +0000 Subject: [PATCH] feat(settings): group the sections and find a setting by name The 41 admin sections sit under seven groups (AI and search, Speech and voices, Media and documents, Chat and email, Security and access, Files and devices, System), the model first. Find a setting at the top of the list, or /, filters them by name, description, or a field's label, hint or choices; Enter opens the first, and a setting found by its field opens with that field focused and its value selected. Ctrl+K finds settings the same way beside recordings and pages. Updates and backups is called Updates, as the docs call it, since Backups has its own section. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012QHdEu9xFwnsCUnJn4yB3v --- ci/clicks/journeys.mjs | 2 +- docs/configuration.md | 8 ++ .../__tests__/settings-find.test.tsx | 127 ++++++++++++++++++ .../__tests__/settings-save.test.tsx | 17 +++ nextjs-frontend/app/globals.css | 7 + .../components/app-shell/command-palette.tsx | 24 +++- .../components/app-shell/shortcuts.tsx | 4 +- .../components/settings/fields.tsx | 4 +- nextjs-frontend/components/settings/find.ts | 84 ++++++++++++ nextjs-frontend/components/settings/model.ts | 2 +- .../components/settings/section.tsx | 22 +++ .../components/settings/settings-shell.tsx | 108 ++++++++++++--- 12 files changed, 382 insertions(+), 27 deletions(-) create mode 100644 nextjs-frontend/__tests__/settings-find.test.tsx create mode 100644 nextjs-frontend/components/settings/find.ts diff --git a/ci/clicks/journeys.mjs b/ci/clicks/journeys.mjs index 40b1ae1b2..e42d83845 100644 --- a/ci/clicks/journeys.mjs +++ b/ci/clicks/journeys.mjs @@ -228,7 +228,7 @@ export const JOURNEYS = [ async run(ctx) { const { page, meter } = ctx; await jumpTo(ctx); - await meter.type(page.getByRole("combobox", { name: /Search recordings and pages/ }), "welcome", "part of its title"); + await meter.type(page.getByRole("combobox", { name: /^Search recordings/ }), "welcome", "part of its title"); await page.getByRole("option", { name: /Welcome back/ }).first().waitFor(); await meter.press("Enter", "Enter to open"); await page.waitForURL(/\/(recordings|resources)\//); diff --git a/docs/configuration.md b/docs/configuration.md index 74c889322..bf1a5c62f 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -114,6 +114,14 @@ upload limit, allowed hosts, trusted proxies, session length), remote access, em telemetry, the Fedora repository, sensors, file shares, uploads, storage, documents, API keys, and IIIF and metadata. The API refuses an allowed-host list that leaves out the address you are using. +The sections are in groups: AI and search, Speech and voices, Media and documents, Chat and email, Security and +access, Files and devices, and System. **Find a setting** at the top of the list (or `/`) finds a section by its name +or what it's for, and a single setting by its label, hint or choices: Enter opens the first, and a setting found by +its label opens with its field in focus and its value selected, so typing replaces it. ⌘K (Ctrl+K) finds settings +the same way, beside recordings and pages. Agents reach the same settings through the API +(`GET/PUT /api/v1/settings/
`), and the admin assistant through `read_settings` and `change_settings` +([Assistant](assistant.md#setting-up-and-running-the-server-by-chat)). + ## Word search Searching by the words goes through the index of `search.engine` (Settings → Search → Word search; how each works is diff --git a/nextjs-frontend/__tests__/settings-find.test.tsx b/nextjs-frontend/__tests__/settings-find.test.tsx new file mode 100644 index 000000000..f817fa56b --- /dev/null +++ b/nextjs-frontend/__tests__/settings-find.test.tsx @@ -0,0 +1,127 @@ +import { fireEvent, render, screen, waitFor } from "@testing-library/react"; +import "@testing-library/jest-dom"; + +import { findSettings, hitHref, SETTINGS_GROUPS } from "@/components/settings/find"; +import { SECTIONS } from "@/components/settings/model"; +import { SettingsShell } from "@/components/settings/settings-shell"; +import { TooltipProvider } from "@/components/ui/tooltip"; + +const push = jest.fn(); +let admin = true; + +jest.mock("next-auth/react", () => ({ useSession: () => ({ data: { accessToken: "t" } }) })); +jest.mock("next/navigation", () => ({ + usePathname: () => "/settings/speakers", + useRouter: () => ({ push }), +})); +jest.mock("@/components/speakers/speakers-page", () => ({ SpeakersPage: () =>

The speakers

})); +jest.mock("@/lib/hooks/session", () => ({ + useArchive: () => ({ + admin, + namespaces: [], + partialNamespaces: [], + namespace: null, + roleIn: () => "owner", + can: () => true, + }), +})); + +const shell = () => + render( + + + , + ); + +beforeEach(() => { + admin = true; + push.mockClear(); +}); + +describe("settings groups", () => { + it("puts every section in exactly one group", () => { + const grouped = SETTINGS_GROUPS.flatMap((g) => g.sections); + expect([...grouped].sort()).toEqual(SECTIONS.map((s) => s.id).sort()); + expect(new Set(grouped).size).toBe(grouped.length); + }); + + it("shows the sections under their groups, the model first", () => { + shell(); + expect(screen.getByText("AI and search")).toBeInTheDocument(); + expect(screen.getByText("System")).toBeInTheDocument(); + const links = screen.getAllByRole("link").map((a) => a.textContent); + expect(links.indexOf("LLM provider")).toBe(links.indexOf("Speakers") + 1); + expect(links).toHaveLength(SECTIONS.length + 1); + }); +}); + +describe("finding a setting", () => { + it("finds a section by its name first", () => { + const hits = findSettings("telegram", true); + expect(hits[0]).toMatchObject({ section: "telegram", byField: false }); + expect(hitHref(hits[0])).toBe("/settings/telegram"); + }); + + it("finds a field by its label, and opens the section on it", () => { + const hits = findSettings("timeout seconds", true); + const llm = hits.find((h) => h.section === "llm")!; + expect(llm.byField).toBe(true); + expect(llm.fields.map((f) => f.key)).toContain("timeout"); + }); + + it("finds a field by one of its choices, ignoring case and accents", () => { + const hits = findSettings("DEEPGRAM", true); + expect(hits.some((h) => h.section === "transcription" && h.fields.some((f) => f.key === "engine"))).toBe(true); + }); + + it("finds only Speakers for people who aren't admins", () => { + expect(findSettings("speak", false).map((h) => h.section)).toEqual(["speakers"]); + expect(findSettings("telegram", false)).toEqual([]); + }); + + it("filters the list as you type, and Enter opens the first", () => { + shell(); + const box = screen.getByRole("searchbox", { name: "Find a setting" }); + fireEvent.change(box, { target: { value: "slack" } }); + expect(screen.getByRole("link", { name: "Slack" })).toBeInTheDocument(); + expect(screen.queryByRole("link", { name: "Transcription" })).not.toBeInTheDocument(); + fireEvent.keyDown(box, { key: "Enter" }); + expect(push).toHaveBeenCalledWith("/settings/slack"); + expect(box).toHaveValue(""); + }); + + it("says so when nothing matches", () => { + shell(); + fireEvent.change(screen.getByRole("searchbox", { name: "Find a setting" }), { target: { value: "zzzz" } }); + expect(screen.getByText("No setting matches that.")).toBeInTheDocument(); + }); + + it("focuses the Find box on /", async () => { + shell(); + fireEvent.keyDown(document.body, { key: "/" }); + await waitFor(() => expect(screen.getByRole("searchbox", { name: "Find a setting" })).toHaveFocus()); + }); + + it("has no Find box for people who aren't admins", () => { + admin = false; + shell(); + expect(screen.queryByRole("searchbox", { name: "Find a setting" })).not.toBeInTheDocument(); + }); +}); + +describe("⌘K", () => { + it("finds settings beside pages, a field opening its section on it", async () => { + const { CommandPalette } = await import("@/components/app-shell/command-palette"); + const { QueryClient, QueryClientProvider } = await import("@tanstack/react-query"); + render( + + + , + ); + fireEvent.keyDown(window, { key: "k", ctrlKey: true }); + fireEvent.change(screen.getByRole("combobox"), { target: { value: "timeout seconds" } }); + const llm = screen.getAllByRole("option").find((o) => o.textContent?.includes("Settings › LLM provider"))!; + fireEvent.click(llm); + expect(push).toHaveBeenCalledWith("/settings/llm?field=llm.timeout"); + }); +}); diff --git a/nextjs-frontend/__tests__/settings-save.test.tsx b/nextjs-frontend/__tests__/settings-save.test.tsx index 536b89ee1..d1cf35c56 100644 --- a/nextjs-frontend/__tests__/settings-save.test.tsx +++ b/nextjs-frontend/__tests__/settings-save.test.tsx @@ -64,3 +64,20 @@ describe("settings", () => { await waitFor(() => expect(Admin.updateSettings).toHaveBeenCalledTimes(1)); }); }); + +describe("opened on one setting", () => { + it("focuses its field with the value selected, so typing replaces it", async () => { + const qc = new QueryClient(); + render( + + + undefined} field="mail.port" /> + + , + ); + const port = screen.getByLabelText("Port") as HTMLInputElement; + await waitFor(() => expect(port).toHaveFocus()); + expect([port.selectionStart, port.selectionEnd]).toEqual([0, port.value.length]); + expect(port.closest("[data-setting]")).toHaveClass("setting-found"); + }); +}); diff --git a/nextjs-frontend/app/globals.css b/nextjs-frontend/app/globals.css index c4177f1b0..eb36d2a47 100644 --- a/nextjs-frontend/app/globals.css +++ b/nextjs-frontend/app/globals.css @@ -199,6 +199,13 @@ } } +/* A setting opened from Find or ⌘K: marked a moment, so the eye lands on it. */ +[data-setting].setting-found { + border-radius: 6px; + background: var(--intent-surface); + box-shadow: 0 0 0 6px var(--intent-surface); +} + @keyframes skeleton { from { background-position: 200% 0; diff --git a/nextjs-frontend/components/app-shell/command-palette.tsx b/nextjs-frontend/components/app-shell/command-palette.tsx index eeb9b840a..64678e610 100644 --- a/nextjs-frontend/components/app-shell/command-palette.tsx +++ b/nextjs-frontend/components/app-shell/command-palette.tsx @@ -2,12 +2,13 @@ import * as D from "@radix-ui/react-dialog"; import { useQuery } from "@tanstack/react-query"; -import { CornerDownLeft, FileAudio, Search, Zap } from "lucide-react"; +import { CornerDownLeft, FileAudio, Search, Settings, Zap } from "lucide-react"; import { useRouter } from "next/navigation"; import { useEffect, useMemo, useRef, useState } from "react"; import { Resources } from "@/app/openapi-client"; import { navFor } from "@/components/app-shell/nav-config"; +import { findSettings, hitHref, settingHref } from "@/components/settings/find"; import { data, useApiClient } from "@/lib/api/browser"; import { tc } from "@/lib/format"; import { useArchive } from "@/lib/hooks/session"; @@ -21,7 +22,7 @@ type Item = { icon: React.ReactNode; }; -/** ⌘K: jump to a recording or a page; ">" limits results to actions. */ +/** ⌘K: jump to a recording, a page or a setting; ">" limits results to actions. */ export function CommandPalette() { const [open, setOpen] = useState(false); const [q, setQ] = useState(""); @@ -105,7 +106,22 @@ export function CommandPalette() { icon: , })) : []; - return [...recordings, ...pages, ...actions]; + // Settings by name, or by a field in them (the LLM's timeout): a field opens its section on it + const settings: Item[] = t + ? findSettings(t, admin) + .flatMap((h) => + h.byField + ? h.fields.map((f) => ({ + label: f.label, + meta: `Settings › ${h.label}`, + href: settingHref(h.section, f), + })) + : [{ label: h.label, meta: `Settings · ${h.group}`, href: hitHref(h) }], + ) + .slice(0, 6) + .map((x) => ({ group: "Settings", icon: , ...x })) + : []; + return [...recordings, ...pages, ...settings, ...actions]; }, [q, recs.data, admin, can]); useEffect(() => setSel(0), [q]); @@ -167,7 +183,7 @@ export function CommandPalette() { aria-expanded aria-controls="palette-list" aria-activedescendant={items[sel] ? `palette-${sel}` : undefined} - placeholder="Search recordings and pages, or > for actions" + placeholder="Search recordings, pages and settings, or > for actions" className="h-14 flex-1 bg-transparent text-[16px] text-fg outline-hidden placeholder:text-fg-muted" /> esc diff --git a/nextjs-frontend/components/app-shell/shortcuts.tsx b/nextjs-frontend/components/app-shell/shortcuts.tsx index 804e6db45..94d42ba45 100644 --- a/nextjs-frontend/components/app-shell/shortcuts.tsx +++ b/nextjs-frontend/components/app-shell/shortcuts.tsx @@ -5,13 +5,13 @@ import { useEffect, useState } from "react"; import { Dialog } from "@/components/ui/dialog"; const KEYS: [string, string][] = [ - ["⌘ K", "Jump to a recording, speaker or page"], + ["⌘ K", "Jump to a recording, speaker, page or setting"], ["[", "Collapse or expand the navigation"], ["Space", "Play or pause (recording page)"], ["J / L", "Back or forward 10 seconds"], ["← / →", "Back or forward 5 seconds"], ["↑ / ↓", "Previous or next turn"], - ["/", "Find in transcript"], + ["/", "Find in transcript, or find a setting"], ["?", "This list"], ]; diff --git a/nextjs-frontend/components/settings/fields.tsx b/nextjs-frontend/components/settings/fields.tsx index b6f261f32..ddddaf5f7 100644 --- a/nextjs-frontend/components/settings/fields.tsx +++ b/nextjs-frontend/components/settings/fields.tsx @@ -58,7 +58,7 @@ export function SettingField({ if (spec.kind === "switch") return ( -
+
{title} {text && ( @@ -74,7 +74,7 @@ export function SettingField({ ); return ( -
+
{spec.kind === "pills" || spec.kind === "cards" || spec.kind === "checks" ? ( {title} diff --git a/nextjs-frontend/components/settings/find.ts b/nextjs-frontend/components/settings/find.ts new file mode 100644 index 000000000..599d90bef --- /dev/null +++ b/nextjs-frontend/components/settings/find.ts @@ -0,0 +1,84 @@ +/** + * Finding a setting by name: the settings sections in their groups, and a search over the sections' names and + * descriptions and their fields' labels, hints and choices, for the Find box in Settings and ⌘K. + */ +import { + FIELDS, + fieldId, + SECTIONS, + WORKSPACE_SECTIONS, + type AnySectionId, + type FieldSpec, + type SectionId, +} from "@/components/settings/model"; + +/** The archive's settings sections (admins), in groups, most used first in each. Every section is in one group. */ +export const SETTINGS_GROUPS: { label: string; sections: SectionId[] }[] = [ + { label: "AI and search", sections: ["llm", "local-model", "ai", "search", "analysis"] }, + { label: "Speech and voices", sections: ["transcription", "speaker-separation", "voice-ids", "speech-providers"] }, + { label: "Media and documents", sections: ["uploads", "documents", "video", "nsfw", "reports", "iiif"] }, + { label: "Chat and email", sections: ["telegram", "slack", "bridge", "mailbox", "mail", "notifications"] }, + { label: "Security and access", sections: ["sign-in", "tokens", "encryption", "access", "remote-access", "https"] }, + { label: "Files and devices", sections: ["storage", "shares", "smb", "nfs", "fedora", "sensors"] }, + { + label: "System", + sections: ["updates", "backups", "components", "workers", "logs", "telemetry", "analytics", "startup"], + }, +]; + +export type SettingHit = { + section: AnySectionId; + /** The section's name. */ + label: string; + /** Its group in Settings ("Your namespaces" for Speakers). */ + group: string; + /** The fields in it that matched. */ + fields: FieldSpec[]; + /** Found by a field only, not by the section's name or description: it opens on the first field. */ + byField: boolean; +}; + +/** Where a setting opens: its section, with the field to scroll to and focus. */ +export function settingHref(section: AnySectionId, field?: FieldSpec): string { + return field ? `/settings/${section}?field=${encodeURIComponent(fieldId(field))}` : `/settings/${section}`; +} + +const fold = (s: string) => s.toLowerCase().normalize("NFKD").replace(/[̀-ͯ]/g, "").replace(/[’‘]/g, "'"); + +/** Sections (and the fields in them) holding every word of `term`, best first: a section by its name, then by its + * group or description, then sections with a field whose label, hint, key or choices match. Admins search every + * section; members only theirs (Speakers). */ +export function findSettings(term: string, admin: boolean): SettingHit[] { + const words = fold(term).split(/\s+/).filter(Boolean); + if (!words.length) return []; + const has = (text: string) => { + const t = fold(text); + return words.every((w) => t.includes(w)); + }; + const byName: SettingHit[] = []; + const byAbout: SettingHit[] = []; + const byField: SettingHit[] = []; + for (const s of WORKSPACE_SECTIONS) + if (has(`${s.label} ${s.id}`)) + byName.push({ section: s.id, label: s.label, group: "Your namespaces", fields: [], byField: false }); + if (!admin) return byName; + for (const g of SETTINGS_GROUPS) + for (const id of g.sections) { + const s = SECTIONS.find((x) => x.id === id)!; + const fields = FIELDS.filter( + (f) => + s.backend.includes(f.section) && + has( + `${f.label} ${f.hint ?? ""} ${f.unit ?? ""} ${fieldId(f)} ${(f.options ?? []).map((o) => o.label).join(" ")}`, + ), + ); + const hit = { section: s.id, label: s.label, group: g.label, fields, byField: false }; + if (has(`${s.label} ${s.id}`)) byName.push(hit); + else if (has(`${g.label} ${s.description}`)) byAbout.push(hit); + else if (fields.length) byField.push({ ...hit, byField: true }); + } + return [...byName, ...byAbout, ...byField]; +} + +/** Where a hit opens: on its first field when only a field matched, else at the top of the section. */ +export const hitHref = (h: SettingHit) => settingHref(h.section, h.byField ? h.fields[0] : undefined); diff --git a/nextjs-frontend/components/settings/model.ts b/nextjs-frontend/components/settings/model.ts index cdd04c5c8..1f380a66d 100644 --- a/nextjs-frontend/components/settings/model.ts +++ b/nextjs-frontend/components/settings/model.ts @@ -301,7 +301,7 @@ export const SECTIONS: SectionSpec[] = [ }, { id: "updates", - label: "Updates and backups", + label: "Updates", backend: ["updates"], description: "New Lens releases: Lens checks for one once a day, backs up and installs it when you say so, and goes back if it doesn't start.", diff --git a/nextjs-frontend/components/settings/section.tsx b/nextjs-frontend/components/settings/section.tsx index c20afb7d3..ccc4c82d8 100644 --- a/nextjs-frontend/components/settings/section.tsx +++ b/nextjs-frontend/components/settings/section.tsx @@ -62,10 +62,13 @@ export function SettingsSection({ id, view, onErrors, + field, }: { id: SectionId; view: SettingsView; onErrors: (id: SectionId, has: boolean) => void; + /** A field to open on (`section.key`), from Find or ⌘K. */ + field?: string | null; }) { const client = useApiClient(); const qc = useQueryClient(); @@ -131,6 +134,7 @@ export function SettingsSection({ }, [view, initial, dirty]); const [held, setHeld] = useUnsavedGuard(dirty); + useFocusField(field); const locked = (f: (typeof specs)[number]) => (view[f.section]?.locked ?? []).includes(f.key.split(".")[0]) ? (ENV[fieldId(f)] ?? "the environment") : null; @@ -418,6 +422,24 @@ export function SettingsSection({ ); } +/** Opened on one field (Find, ⌘K): opens what folds it away, scrolls to it, focuses its control and marks it a moment. */ +function useFocusField(field?: string | null) { + useEffect(() => { + if (!field) return; + const el = document.querySelector(`[data-setting="${CSS.escape(field)}"]`); + if (!el) return; + for (let d = el.closest("details"); d; d = d.parentElement?.closest("details") ?? null) d.open = true; + el.scrollIntoView?.({ block: "center" }); + const control = el.querySelector("input, select, textarea, button"); + control?.focus({ preventScroll: true }); + // what it holds is selected, so typing replaces it + if (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) control.select(); + el.classList.add("setting-found"); + const t = setTimeout(() => el.classList.remove("setting-found"), 2000); + return () => clearTimeout(t); + }, [field]); +} + function ChangeRow({ label, before, diff --git a/nextjs-frontend/components/settings/settings-shell.tsx b/nextjs-frontend/components/settings/settings-shell.tsx index b1739b022..69e301d6f 100644 --- a/nextjs-frontend/components/settings/settings-shell.tsx +++ b/nextjs-frontend/components/settings/settings-shell.tsx @@ -48,10 +48,12 @@ import { ScrollText, } from "lucide-react"; import Link from "next/link"; -import { useCallback, useState } from "react"; +import { useRouter, useSearchParams } from "next/navigation"; +import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { Admin } from "@/app/openapi-client"; import { isUnreachable, ServerUnreachable } from "@/components/errors/error-states"; +import { findSettings, hitHref, settingHref, SETTINGS_GROUPS, type SettingHit } from "@/components/settings/find"; import { type AnySectionId, isWorkspaceSection, @@ -65,6 +67,7 @@ import { SettingsSection } from "@/components/settings/section"; import { SpeakersPage } from "@/components/speakers/speakers-page"; import { EmptyState, Skeleton } from "@/components/ui/states"; import { Button } from "@/components/ui/button"; +import { SearchInput } from "@/components/ui/field"; import { data, useApiClient } from "@/lib/api/browser"; import { useArchive } from "@/lib/hooks/session"; import { cn } from "@/lib/utils"; @@ -149,12 +152,58 @@ function GroupLabel({ children }: { children: React.ReactNode }) { return
{children}
; } +/** What Find found: each section, with the fields in it that matched, under its group. */ +function Found({ hits, section, onNavigate }: { hits: SettingHit[]; section: AnySectionId; onNavigate: () => void }) { + if (!hits.length) return

No setting matches that.

; + let group = ""; + return hits.map((h) => { + const label = h.group !== group ? h.group : null; + group = h.group; + return ( +
+ {label && {label}} + + {h.fields.slice(0, 4).map((f) => ( + + {f.label} + + ))} +
+ ); + }); +} + /** Settings: Speakers for every member, then the archive's settings for admins (ST1–ST3, MD5), one at a time. On a * phone the sections are a list that opens from the section's name, rather than a strip that scrolls sideways. */ export function SettingsShell({ section }: { section: AnySectionId }) { const { admin } = useArchive(); + const router = useRouter(); const [open, setOpen] = useState(false); - const close = () => setOpen(false); + const [term, setTerm] = useState(""); + const hits = useMemo(() => findSettings(term, admin), [term, admin]); + const close = () => { + setOpen(false); + setTerm(""); + }; + const find = useRef(null); + // "/" finds a setting, as it finds a word in a transcript + useEffect(() => { + const onKey = (e: KeyboardEvent) => { + const t = e.target as HTMLElement; + if (e.key !== "/" || e.metaKey || e.ctrlKey || e.altKey) return; + if (["INPUT", "TEXTAREA", "SELECT"].includes(t.tagName) || t.isContentEditable || !find.current) return; + e.preventDefault(); + setOpen(true); + setTimeout(() => find.current?.focus(), 0); + }; + window.addEventListener("keydown", onKey); + return () => window.removeEventListener("keydown", onKey); + }, []); const current = [...WORKSPACE_SECTIONS, ...SECTIONS].find((s) => s.id === section); const CurrentIcon = ICON[section]; const [withErrors, setWithErrors] = useState>(new Set()); @@ -189,23 +238,47 @@ export function SettingsShell({ section }: { section: AnySectionId }) {
- Your namespaces - {WORKSPACE_SECTIONS.map((s) => ( - - ))} {admin && ( + setTerm(e.target.value)} + onKeyDown={(e) => { + if (e.key === "Escape") setTerm(""); + if (e.key !== "Enter" || !hits[0]) return; + e.preventDefault(); + router.push(hitHref(hits[0])); + close(); + }} + className="mx-0.5 mb-1 mt-2" + /> + )} + {term.trim() ? ( + + ) : ( <> - Archive - {SECTIONS.map((s) => ( - + Your namespaces + {WORKSPACE_SECTIONS.map((s) => ( + ))} + {admin && + SETTINGS_GROUPS.map((g) => ( +
+ {g.label} + {g.sections.map((id) => ( + s.id === id)!.label} + on={id === section} + errors={withErrors.has(id)} + onNavigate={close} + /> + ))} +
+ ))} )}
@@ -238,6 +311,7 @@ function ArchiveSettings({ }) { const client = useApiClient(); const { admin, me } = useArchive(); + const field = useSearchParams().get("field"); const settings = useQuery({ queryKey: ["settings"], queryFn: async () => (await data(Admin.getSettings({ client }))) as unknown as SettingsView, @@ -281,6 +355,6 @@ function ArchiveSettings({ ) ) : ( - + ); }