Files
Epicure/apps/web/app/admin/settings/page.tsx
T
Arnaud 811d4cad42 feat: in-app support form with email + Gitea issue integration (v0.49.0)
Users can now report bugs, suggestions, or questions from a new /support
page. Each submission sends a confirmation email and, when GITEA_URL/
GITEA_TOKEN/GITEA_REPO are configured in admin Settings, opens a labeled
issue on that repo automatically (best-effort — failure doesn't block the
ticket). Admins get a Support section to triage status and retry failed
Gitea issue creation.

New support_tickets table, gitea.ts client, site-settings entries for the
three new secrets, and OpenAPI docs for the two user-facing endpoints.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 11:23:02 +02:00

44 lines
1.6 KiB
TypeScript

import type { Metadata } from "next";
import { getAllSiteSettings, isSignupsDisabled } from "@/lib/site-settings";
import { AdminSettingsForm } from "@/components/admin/admin-settings-form";
import { SignupsToggle } from "@/components/admin/signups-toggle";
export const metadata: Metadata = {};
const SETTING_GROUPS = [
{
title: "Push Notifications (VAPID)",
description: "Keys for web push notifications. Generate with: npx web-push generate-vapid-keys",
keys: ["NEXT_PUBLIC_VAPID_PUBLIC_KEY", "VAPID_PRIVATE_KEY"] as const,
},
{
title: "Gitea Integration",
description: "Support tickets submitted in-app automatically open an issue on this Gitea repo. Token needs issue read/write scope on the target repo.",
keys: ["GITEA_URL", "GITEA_TOKEN", "GITEA_REPO"] as const,
},
];
export default async function AdminSettingsPage() {
const settings = await getAllSiteSettings();
const signupsDisabled = await isSignupsDisabled();
return (
<div className="space-y-8">
<div>
<h1 className="text-2xl font-bold tracking-tight">Site Settings</h1>
<p className="text-muted-foreground text-sm mt-1">
Override .env values at runtime. DB values take precedence over environment variables.
Clear a value to fall back to the environment variable. AI provider keys and model
defaults have moved to AI Config.
</p>
</div>
<SignupsToggle initialDisabled={signupsDisabled} />
{SETTING_GROUPS.map((group) => (
<AdminSettingsForm key={group.title} group={group} settings={settings} />
))}
</div>
);
}