mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
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:
@@ -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 } }),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user