fix: polish settings and command menu

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-13 19:51:44 +02:00
1 parent 2ba31fd37b
commit 1723a9e744
9 files changed
+37 -68

No files matched your search

@@ -53,7 +53,7 @@ export default async function BoardSettingsPage(props: Props) {
}
return (
<Container>
<Container size="xl">
<Stack>
<Title>{t("title", { boardName: capitalize(board.name) })}</Title>
<BoardSettingsForm
@@ -1,5 +1,9 @@
"use client";
import { Anchor } from "@mantine/core";
import { IconExternalLink } from "@tabler/icons-react";
import { createDocumentationLink } from "@homarr/definitions";
import type { UseFormReturnType } from "@homarr/form";
import { useScopedI18n } from "@homarr/translation/client";
@@ -12,11 +16,25 @@ interface AnalyticsSettingsProps {
}
export const AnalyticsSettings = ({ form }: AnalyticsSettingsProps) => {
const t = useScopedI18n("management.page.settings.section.analytics");
const t = useScopedI18n("management.page.settings.section");
return (
<SectionCard title={t("title")}>
<SwitchSetting form={form} formKey="enableGeneral" title={t("general.title")} text={t("general.text")} />
<SectionCard title={t("analytics.title")}>
<SwitchSetting
form={form}
formKey="enableGeneral"
title={t("analytics.general.title")}
text={t("analytics.general.text")}
/>
<Anchor
href={createDocumentationLink("/docs/management/settings", "#analytics")}
target="_blank"
rel="noopener noreferrer"
size="sm"
>
{t("analyticsDocumentation")}
<IconExternalLink size={14} style={{ marginInlineStart: 4, verticalAlign: "middle" }} />
</Anchor>
</SectionCard>
);
};
@@ -1,11 +1,10 @@
import { notFound } from "next/navigation";
import { Stack, Title } from "@mantine/core";
import { api } from "@homarr/api/server";
import { auth } from "@homarr/auth/next";
import { getScopedI18n } from "@homarr/translation/server";
import { DynamicBreadcrumb } from "~/components/navigation/dynamic-breadcrumb";
import { ManagePageLayout } from "~/components/manage/manage-page-layout";
import { SettingsForm } from "./_components/settings-form";
export async function generateMetadata() {
@@ -28,12 +27,8 @@ export default async function SettingsPage() {
const tSettings = await getScopedI18n("management.page.settings");
return (
<>
<DynamicBreadcrumb />
<Stack>
<Title order={1}>{tSettings("title")}</Title>
<SettingsForm initialData={serverSettings} />
</Stack>
</>
<ManagePageLayout title={tSettings("title")}>
<SettingsForm initialData={serverSettings} />
</ManagePageLayout>
);
}
@@ -22,7 +22,6 @@ export default async function WorkshopPage() {
return (
<ManagePageLayout
title={t("title")}
size="xl"
primaryAction={
<Button
component="a"