Update notification-settings.tsx

This commit is contained in:
MacRimi
2026-03-21 20:41:02 +01:00
parent ff08f4c0b5
commit 6534fa7171

View File

@@ -368,6 +368,13 @@ export function NotificationSettings() {
if (showHistory) loadHistory()
}, [showHistory, loadHistory])
// Auto-expand AI section when AI is enabled
useEffect(() => {
if (config.ai_enabled) {
setShowAdvanced(true)
}
}, [config.ai_enabled])
const updateConfig = (updater: (prev: NotificationConfig) => NotificationConfig) => {
setConfig(prev => {
const next = updater(prev)
@@ -537,6 +544,8 @@ export function NotificationSettings() {
ai_language: cfg.ai_language,
ai_ollama_url: cfg.ai_ollama_url,
ai_openai_base_url: cfg.ai_openai_base_url,
ai_prompt_mode: cfg.ai_prompt_mode || "default",
ai_custom_prompt: cfg.ai_custom_prompt || "",
hostname: cfg.hostname,
webhook_secret: cfg.webhook_secret,
webhook_allowed_ips: cfg.webhook_allowed_ips,