Add ntfy.sh notification support

- Add ntfy_topic and ntfy_enabled columns to database
- Add sendNtfyNotification function with emoji tags
- Add /settings/notifications/test/ntfy endpoint
- Add ntfy section in Settings UI with topic input
- Show ntfy badge in ProductDetail notification status

ntfy.sh is a free, simple notification service - no account needed.
Users just pick a topic name and subscribe in the ntfy app.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
clucraft 2026-01-22 21:02:49 -05:00
parent a4da43c127
commit 3d6af13ac4
7 changed files with 231 additions and 4 deletions

View file

@ -157,6 +157,8 @@ export interface NotificationSettings {
pushover_user_key: string | null;
pushover_app_token: string | null;
pushover_enabled: boolean;
ntfy_topic: string | null;
ntfy_enabled: boolean;
}
export const settingsApi = {
@ -172,6 +174,8 @@ export const settingsApi = {
pushover_user_key?: string | null;
pushover_app_token?: string | null;
pushover_enabled?: boolean;
ntfy_topic?: string | null;
ntfy_enabled?: boolean;
}) => api.put<NotificationSettings & { message: string }>('/settings/notifications', data),
testTelegram: () =>
@ -183,6 +187,9 @@ export const settingsApi = {
testPushover: () =>
api.post<{ message: string }>('/settings/notifications/test/pushover'),
testNtfy: () =>
api.post<{ message: string }>('/settings/notifications/test/ntfy'),
// AI Settings
getAI: () =>
api.get<AISettings>('/settings/ai'),