mirror of
https://github.com/clucraft/PriceGhost.git
synced 2026-05-15 10:52:36 +02:00
Add toggles to enable/disable notification channels
- Add telegram_enabled, discord_enabled, pushover_enabled columns to database - Update notification service to check enabled status before sending - Add toggle switches in Settings UI for each configured channel - Update ProductDetail to only show badges for enabled channels - Channels default to enabled so existing users keep notifications Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f1deb924d8
commit
433c0a0b12
7 changed files with 156 additions and 11 deletions
|
|
@ -126,8 +126,11 @@ export const pricesApi = {
|
|||
export interface NotificationSettings {
|
||||
telegram_configured: boolean;
|
||||
telegram_chat_id: string | null;
|
||||
telegram_enabled: boolean;
|
||||
discord_configured: boolean;
|
||||
discord_enabled: boolean;
|
||||
pushover_configured: boolean;
|
||||
pushover_enabled: boolean;
|
||||
}
|
||||
|
||||
export const settingsApi = {
|
||||
|
|
@ -137,9 +140,12 @@ export const settingsApi = {
|
|||
updateNotifications: (data: {
|
||||
telegram_bot_token?: string | null;
|
||||
telegram_chat_id?: string | null;
|
||||
telegram_enabled?: boolean;
|
||||
discord_webhook_url?: string | null;
|
||||
discord_enabled?: boolean;
|
||||
pushover_user_key?: string | null;
|
||||
pushover_app_token?: string | null;
|
||||
pushover_enabled?: boolean;
|
||||
}) => api.put<NotificationSettings & { message: string }>('/settings/notifications', data),
|
||||
|
||||
testTelegram: () =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue