Move the ntfy alert sink to Settings, shared by all alert rules
Alert rules no longer carry their own ntfy topic/server; Settings now holds one process-wide ntfy sink (with its own "send test notification"), and the Alerts panel is left to just define rule conditions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ae4e550c1f
commit
18c2d72d22
@@ -153,6 +153,15 @@ export function useSettingsPanel() {
|
||||
[guarded],
|
||||
)
|
||||
|
||||
const setNtfySink = useCallback(
|
||||
(ntfyTopic: string | null, ntfyServer: string | null) =>
|
||||
guarded(async () => {
|
||||
const next = await updateSettings({ ntfyTopic, ntfyServer })
|
||||
setSettings(next)
|
||||
})(),
|
||||
[guarded],
|
||||
)
|
||||
|
||||
const importCssEntry = useCallback(
|
||||
(filename: string, content: string) =>
|
||||
guarded(async () => {
|
||||
@@ -230,6 +239,7 @@ export function useSettingsPanel() {
|
||||
setColorScheme,
|
||||
setCustomTheme,
|
||||
setMaxLogs,
|
||||
setNtfySink,
|
||||
importCssEntry,
|
||||
importThemeEntry,
|
||||
linkThemeEntry,
|
||||
|
||||
Reference in New Issue
Block a user