Extend badge color settings to cover integration types too

Settings → DNS Badges only let you customize DNS provider badge
colors. Expand it into a general Badges page with a second section
for the six integration types (Tailscale, Proxmox, Synology,
Semaphore, Gitea, Dockhand), applied to the type badge in the Manage
integrations table.

- New integrationColors key on AppSettings, stored/merged the same way
  as providerColors via the existing settingsStore.
- New GET /api/settings/integration-colors — non-secret, any signed-in
  user, mirroring /provider-colors — so the badge color can be read
  without needing admin access to the full settings payload.
- Renamed DnsBadgeSettings.tsx -> BadgeSettings.tsx (route
  /settings/dns-badges -> /settings/badges, sub-nav label "DNS
  Badges" -> "Badges") with both color sections saved together.

Verified end-to-end against the real dev server: PUT persists
integration colors independently of provider colors, the public
integration-colors endpoint reflects updates immediately, and the
change is audit-logged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
bobbanandClaude Sonnet 5 committed 2026-09-15 21:28:26 +02:00
1 parent 7fed1dbfa4
commit ad6783b6a1
9 files changed
+175 -100

No files matched your search

+2
View File
@@ -126,6 +126,7 @@ export interface AppSettings {
webhook: WebhookSettings;
notifications: NotificationEvents;
providerColors: Record<string, string>;
integrationColors: Record<string, string>;
}
export type AppSettingsPatch = { [K in keyof AppSettings]?: Partial<AppSettings[K]> };
@@ -653,6 +654,7 @@ export const api = {
settings: {
get: () => request<{ settings: AppSettings }>("/api/settings"),
providerColors: () => request<{ providerColors: Record<string, string> }>("/api/settings/provider-colors"),
integrationColors: () => request<{ integrationColors: Record<string, string> }>("/api/settings/integration-colors"),
update: (data: AppSettingsPatch) =>
request<{ settings: AppSettings }>("/api/settings", { method: "PUT", body: JSON.stringify(data) }),
testGotify: (data: { url: string; token: string; priority?: number }) =>