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>
This commit is contained in:
@@ -141,6 +141,24 @@ export function weeklyDigestHtml(opts: {
|
||||
);
|
||||
}
|
||||
|
||||
export function supportTicketReceivedHtml(opts: {
|
||||
type: string;
|
||||
title: string;
|
||||
ticketUrl: string;
|
||||
giteaIssueUrl: string | null;
|
||||
}) {
|
||||
const { type, title, ticketUrl, giteaIssueUrl } = opts;
|
||||
const typeLabel = type === "bug" ? "bug report" : type === "suggestion" ? "suggestion" : "question";
|
||||
return layout(
|
||||
"We got your message — Epicure",
|
||||
`<h1 style="margin:0 0 8px;font-size:24px;">Thanks for reaching out</h1>
|
||||
<p style="margin:0 0 4px;color:#57534e;line-height:1.6;">We received your ${typeLabel}:</p>
|
||||
<p style="margin:16px 0;padding:12px 16px;background:#fafaf9;border-radius:8px;border:1px solid #e7e5e4;font-weight:600;">${title}</p>
|
||||
<p style="margin:0 0 4px;color:#57534e;line-height:1.6;">We'll follow up if we need more details.${giteaIssueUrl ? " It's also been logged for tracking." : ""}</p>
|
||||
${btn(ticketUrl, "View your ticket")}`
|
||||
);
|
||||
}
|
||||
|
||||
export function welcomeHtml(name: string) {
|
||||
return layout(
|
||||
"Welcome to Epicure",
|
||||
|
||||
Reference in New Issue
Block a user