diff --git a/messages/de.json b/messages/de.json index 892c3ee4d..8fd92c719 100644 --- a/messages/de.json +++ b/messages/de.json @@ -1107,6 +1107,8 @@ "telegramGlobal": "Telegram-Benachrichtigungen systemweit erlauben.", "ntfyGlobal": "ntfy-Benachrichtigungen systemweit erlauben.", "webPushGlobal": "Browser-Push-Benachrichtigungen systemweit erlauben.", + "integrationWebPush": "Web Push", + "integrationBugReport": "Bug-Reports", "apiGlobal": "API-Endpunkte und API-Tokens systemweit erlauben.", "moodLogGlobal": "moodLog-Integration systemweit erlauben.", "sectionGeneral": "Allgemein", diff --git a/messages/en.json b/messages/en.json index 67eb7b06b..ef71781c5 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1107,6 +1107,8 @@ "telegramGlobal": "Allow Telegram notifications system-wide.", "ntfyGlobal": "Allow ntfy notifications system-wide.", "webPushGlobal": "Allow browser push notifications system-wide.", + "integrationWebPush": "Web Push", + "integrationBugReport": "Bug Report", "apiGlobal": "Allow API endpoints and API tokens system-wide.", "moodLogGlobal": "Allow moodLog integration system-wide.", "sectionGeneral": "General", diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 6d213e4e9..e6b64bcc9 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -378,7 +378,7 @@ function SystemStatusSection({ id }: { id: string }) { {status.integrations.webPush && ( @@ -386,7 +386,7 @@ function SystemStatusSection({ id }: { id: string }) { {status.integrations.bugReport && ( @@ -518,7 +518,7 @@ function ServicesSection({ id }: { id: string }) { disabled={updateSettings.isPending} /> ("OPEN"); + const [activeStatus, setActiveStatus] = useState("OPEN"); const [selected, setSelected] = useState(null); const { data, isLoading } = useQuery({ @@ -2281,7 +2280,11 @@ function FeedbackInboxSection({ id }: { id: string }) { {STATUS_TABS.map((s) => ( - {t(`admin.feedback.tab${s.charAt(0) + s.slice(1).toLowerCase()}`)} + + {t( + `admin.feedback.tab${s.charAt(0) + s.slice(1).toLowerCase()}`, + )} + {counts[s] ?? 0} @@ -2328,7 +2331,7 @@ function FeedbackInboxSection({ id }: { id: string }) { {data.items.map((item, i) => ( setSelected(item)} > @@ -2337,7 +2340,7 @@ function FeedbackInboxSection({ id }: { id: string }) { - + {item.subject} @@ -2379,9 +2382,16 @@ function FeedbackInboxSection({ id }: { id: string }) { ); } -function FeedbackCategoryBadge({ category }: { category: FeedbackCategoryType }) { +function FeedbackCategoryBadge({ + category, +}: { + category: FeedbackCategoryType; +}) { const { t } = useTranslations(); - const map: Record = { + const map: Record< + FeedbackCategoryType, + { label: string; className: string } + > = { BUG: { label: t("admin.feedback.categoryBug"), className: "bg-red-500/15 text-red-400 border-red-500/30", @@ -2400,7 +2410,9 @@ function FeedbackCategoryBadge({ category }: { category: FeedbackCategoryType }) }, }; const cfg = map[category]; - return {cfg.label}; + return ( + {cfg.label} + ); } function FeedbackDetailDialog({ @@ -2487,11 +2499,12 @@ function FeedbackDetailDialog({ const url = typeof meta.url === "string" ? meta.url : null; const locale = typeof meta.locale === "string" ? meta.locale : null; const userAgent = typeof meta.userAgent === "string" ? meta.userAgent : null; - const appVersion = typeof meta.appVersion === "string" ? meta.appVersion : null; + const appVersion = + typeof meta.appVersion === "string" ? meta.appVersion : null; return ( - + @@ -2529,7 +2542,7 @@ function FeedbackDetailDialog({ {(url || locale || userAgent || appVersion) && (
-

+

{t("admin.feedback.metadataHeading")}

@@ -2571,14 +2584,14 @@ function FeedbackDetailDialog({ {item.screenshotBase64 && (
-

+

{t("admin.feedback.screenshotHeading")}

{/* eslint-disable-next-line @next/next/no-img-element */} Screenshot
)} @@ -2611,7 +2624,7 @@ function FeedbackDetailDialog({
-
+
- + {direction === "before" ? t("medications.phaseBeforeEnd") : t("medications.phaseAfterEnd")} @@ -197,12 +223,12 @@ export function PhaseConfigDialog({ )} {statusMessage && ( -
+
{statusMessage}
)} - +