fix(ntfy): improve admin ntfy UX and add clear token button

- Add missing admin.ntfy.hint translation key in all 15 languages
- Add admin ntfy server hint clarifying it is the default for users
- Expose admin_ntfy_server via PreferencesMatrix so user settings
  placeholder reflects the admin-configured default
- Add clear token button to admin ntfy panel (same pattern as user settings)
- Extract common.clear from settings.ntfyUrl.clearToken across all 15 languages
This commit is contained in:
jubnl
2026-04-15 20:23:31 +02:00
parent 5656731850
commit 9e8d101d63
18 changed files with 89 additions and 24 deletions
@@ -89,6 +89,7 @@ export interface PreferencesMatrix {
available_channels: AvailableChannels;
event_types: NotifEventType[];
implemented_combos: Record<NotifEventType, NotifChannel[]>;
defaults?: { ntfyServer: string | null };
}
/**
@@ -152,6 +153,7 @@ export function getPreferencesMatrix(userId: number, userRole: string, scope: 'u
available_channels,
event_types,
implemented_combos: IMPLEMENTED_COMBOS,
...(scope === 'user' && { defaults: { ntfyServer: getAppSetting('admin_ntfy_server') || null } }),
};
}