diff --git a/wwwroot/settings.ui b/wwwroot/settings.ui index c61bb5f..39941a8 100644 --- a/wwwroot/settings.ui +++ b/wwwroot/settings.ui @@ -53,68 +53,58 @@ "subwidgets": [ { "widgettype": "Form", + "id": "general-settings-form", "options": { "width": "100%", - "maxWidth": "600px" - }, - "subwidgets": [ - { - "widgettype": "UiCode", - "id": "default-model", - "options": { + "maxWidth": "600px", + "fields": [ + { + "widgettype": "UiCode", "name": "default-model", "label": "Default AI Model", "placeholder": "Select default model...", "width": "100%", "marginBottom": "16px" - } - }, - { - "widgettype": "UiInt", - "id": "session-timeout", - "options": { + }, + { + "widgettype": "UiInt", "name": "session-timeout", "label": "Session Timeout (minutes)", "placeholder": "Enter timeout in minutes...", "width": "100%", "marginBottom": "16px" - } - }, - { - "widgettype": "UiCheck", - "id": "auto-save", - "options": { + }, + { + "widgettype": "UiCheck", "name": "auto-save", "label": "Auto-save sessions", "checked": true, "marginBottom": "24px" } - }, + ] + } + }, + { + "widgettype": "Button", + "options": { + "label": "Save General Settings", + "bgcolor": "#22C55E", + "color": "#FFFFFF", + "border": "none", + "borderRadius": "6px", + "padding": "10px 20px", + "fontWeight": "600" + }, + "binds": [ { - "widgettype": "Button", - "options": { - "label": "Save General Settings", - "bgcolor": "#22C55E", - "color": "#FFFFFF", - "border": "none", - "borderRadius": "6px", - "padding": "10px 20px", - "fontWeight": "600" - }, - "binds": [ - { - "wid": "self", - "event": "click", - "actiontype": "registerfunction", - "target": "self", - "rfname": "save_general_settings", - "params": { - "default_model": "{{default-model.value}}", - "session_timeout": "{{session-timeout.value}}", - "auto_save": "{{auto-save.checked}}" - } - } - ] + "wid": "self", + "event": "click", + "actiontype": "registerfunction", + "target": "app.general-tab", + "rfname": "save_general_settings", + "params": { + "form_data": "{{general-settings-form.data}}" + } } ] } @@ -166,7 +156,7 @@ "wid": "self", "event": "click", "actiontype": "registerfunction", - "target": "self", + "target": "app.models-tab", "rfname": "add_model", "params": {} } @@ -193,7 +183,6 @@ "marginBottom": "16px" } }, - { { "widgettype": "UiCheck", "options": { @@ -210,7 +199,6 @@ "label": "Encrypt local storage", "checked": "{{security.encrypt_storage}}", "marginBottom": "24px" - "marginBottom": "24px" } }, { @@ -224,19 +212,19 @@ "padding": "10px 20px", "fontWeight": "600" }, - "binds": [ - { - "wid": "self", - "event": "click", - "actiontype": "registerfunction", - "target": "self", - "rfname": "save_security_settings", - "params": { - "require_auth": "{{require-auth.checked}}", - "encrypt_storage": "{{encrypt-storage.checked}}" - } - } - ] + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "registerfunction", + "target": "app.security-tab", + "rfname": "save_security_settings", + "params": { + "require_auth": "{{require-auth.checked}}", + "encrypt_storage": "{{encrypt-storage.checked}}" + } + } + ] } ] }, @@ -285,18 +273,18 @@ "padding": "10px 20px", "fontWeight": "600" }, - "binds": [ - { - "wid": "self", - "event": "click", - "actiontype": "registerfunction", - "target": "self", - "rfname": "save_appearance_settings", - "params": { - "theme": "{{theme-select.value}}" - } - } - ] + "binds": [ + { + "wid": "self", + "event": "click", + "actiontype": "registerfunction", + "target": "app.appearance-tab", + "rfname": "save_appearance_settings", + "params": { + "theme": "{{theme-select.value}}" + } + } + ] } ] }