mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 18:12:15 +00:00
Update notification-settings.tsx
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user