Fix Form控件结构: ensure all Form controls use options.fields instead of subwidgets
This commit is contained in:
parent
eee254da60
commit
30eae89807
@ -53,68 +53,58 @@
|
|||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "Form",
|
"widgettype": "Form",
|
||||||
|
"id": "general-settings-form",
|
||||||
"options": {
|
"options": {
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"maxWidth": "600px"
|
"maxWidth": "600px",
|
||||||
},
|
"fields": [
|
||||||
"subwidgets": [
|
{
|
||||||
{
|
"widgettype": "UiCode",
|
||||||
"widgettype": "UiCode",
|
|
||||||
"id": "default-model",
|
|
||||||
"options": {
|
|
||||||
"name": "default-model",
|
"name": "default-model",
|
||||||
"label": "Default AI Model",
|
"label": "Default AI Model",
|
||||||
"placeholder": "Select default model...",
|
"placeholder": "Select default model...",
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"marginBottom": "16px"
|
"marginBottom": "16px"
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
{
|
"widgettype": "UiInt",
|
||||||
"widgettype": "UiInt",
|
|
||||||
"id": "session-timeout",
|
|
||||||
"options": {
|
|
||||||
"name": "session-timeout",
|
"name": "session-timeout",
|
||||||
"label": "Session Timeout (minutes)",
|
"label": "Session Timeout (minutes)",
|
||||||
"placeholder": "Enter timeout in minutes...",
|
"placeholder": "Enter timeout in minutes...",
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"marginBottom": "16px"
|
"marginBottom": "16px"
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
{
|
"widgettype": "UiCheck",
|
||||||
"widgettype": "UiCheck",
|
|
||||||
"id": "auto-save",
|
|
||||||
"options": {
|
|
||||||
"name": "auto-save",
|
"name": "auto-save",
|
||||||
"label": "Auto-save sessions",
|
"label": "Auto-save sessions",
|
||||||
"checked": true,
|
"checked": true,
|
||||||
"marginBottom": "24px"
|
"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",
|
"wid": "self",
|
||||||
"options": {
|
"event": "click",
|
||||||
"label": "Save General Settings",
|
"actiontype": "registerfunction",
|
||||||
"bgcolor": "#22C55E",
|
"target": "app.general-tab",
|
||||||
"color": "#FFFFFF",
|
"rfname": "save_general_settings",
|
||||||
"border": "none",
|
"params": {
|
||||||
"borderRadius": "6px",
|
"form_data": "{{general-settings-form.data}}"
|
||||||
"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}}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -166,7 +156,7 @@
|
|||||||
"wid": "self",
|
"wid": "self",
|
||||||
"event": "click",
|
"event": "click",
|
||||||
"actiontype": "registerfunction",
|
"actiontype": "registerfunction",
|
||||||
"target": "self",
|
"target": "app.models-tab",
|
||||||
"rfname": "add_model",
|
"rfname": "add_model",
|
||||||
"params": {}
|
"params": {}
|
||||||
}
|
}
|
||||||
@ -193,7 +183,6 @@
|
|||||||
"marginBottom": "16px"
|
"marginBottom": "16px"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
{
|
{
|
||||||
"widgettype": "UiCheck",
|
"widgettype": "UiCheck",
|
||||||
"options": {
|
"options": {
|
||||||
@ -210,7 +199,6 @@
|
|||||||
"label": "Encrypt local storage",
|
"label": "Encrypt local storage",
|
||||||
"checked": "{{security.encrypt_storage}}",
|
"checked": "{{security.encrypt_storage}}",
|
||||||
"marginBottom": "24px"
|
"marginBottom": "24px"
|
||||||
"marginBottom": "24px"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -224,19 +212,19 @@
|
|||||||
"padding": "10px 20px",
|
"padding": "10px 20px",
|
||||||
"fontWeight": "600"
|
"fontWeight": "600"
|
||||||
},
|
},
|
||||||
"binds": [
|
"binds": [
|
||||||
{
|
{
|
||||||
"wid": "self",
|
"wid": "self",
|
||||||
"event": "click",
|
"event": "click",
|
||||||
"actiontype": "registerfunction",
|
"actiontype": "registerfunction",
|
||||||
"target": "self",
|
"target": "app.security-tab",
|
||||||
"rfname": "save_security_settings",
|
"rfname": "save_security_settings",
|
||||||
"params": {
|
"params": {
|
||||||
"require_auth": "{{require-auth.checked}}",
|
"require_auth": "{{require-auth.checked}}",
|
||||||
"encrypt_storage": "{{encrypt-storage.checked}}"
|
"encrypt_storage": "{{encrypt-storage.checked}}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -285,18 +273,18 @@
|
|||||||
"padding": "10px 20px",
|
"padding": "10px 20px",
|
||||||
"fontWeight": "600"
|
"fontWeight": "600"
|
||||||
},
|
},
|
||||||
"binds": [
|
"binds": [
|
||||||
{
|
{
|
||||||
"wid": "self",
|
"wid": "self",
|
||||||
"event": "click",
|
"event": "click",
|
||||||
"actiontype": "registerfunction",
|
"actiontype": "registerfunction",
|
||||||
"target": "self",
|
"target": "app.appearance-tab",
|
||||||
"rfname": "save_appearance_settings",
|
"rfname": "save_appearance_settings",
|
||||||
"params": {
|
"params": {
|
||||||
"theme": "{{theme-select.value}}"
|
"theme": "{{theme-select.value}}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user