Fix new_session.ui: correct Form structure using options.fields instead of subwidgets
This commit is contained in:
parent
b30a98f65e
commit
eee254da60
@ -22,36 +22,27 @@
|
|||||||
"id": "new-session-form",
|
"id": "new-session-form",
|
||||||
"options": {
|
"options": {
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"maxWidth": "600px"
|
"maxWidth": "600px",
|
||||||
},
|
"fields": [
|
||||||
"subwidgets": [
|
{
|
||||||
{
|
"widgettype": "UiStr",
|
||||||
"widgettype": "UiStr",
|
|
||||||
"id": "session-name",
|
|
||||||
"options": {
|
|
||||||
"name": "session-name",
|
"name": "session-name",
|
||||||
"label": "Session Name",
|
"label": "Session Name",
|
||||||
"placeholder": "Enter session name...",
|
"placeholder": "Enter session name...",
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"marginBottom": "16px"
|
"marginBottom": "16px"
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
{
|
"widgettype": "UiCode",
|
||||||
"widgettype": "UiCode",
|
|
||||||
"id": "model-select",
|
|
||||||
"options": {
|
|
||||||
"name": "model-select",
|
"name": "model-select",
|
||||||
"label": "AI Model",
|
"label": "AI Model",
|
||||||
"placeholder": "Select model...",
|
"placeholder": "Select model...",
|
||||||
"width": "100%",
|
"width": "100%",
|
||||||
"marginBottom": "16px",
|
"marginBottom": "16px",
|
||||||
"items": []
|
"items": []
|
||||||
}
|
},
|
||||||
},
|
{
|
||||||
{
|
"widgettype": "UiText",
|
||||||
"widgettype": "UiText",
|
|
||||||
"id": "initial-prompt",
|
|
||||||
"options": {
|
|
||||||
"name": "initial-prompt",
|
"name": "initial-prompt",
|
||||||
"label": "Initial Prompt (Optional)",
|
"label": "Initial Prompt (Optional)",
|
||||||
"placeholder": "Enter initial context or instructions...",
|
"placeholder": "Enter initial context or instructions...",
|
||||||
@ -59,58 +50,58 @@
|
|||||||
"height": "100px",
|
"height": "100px",
|
||||||
"marginBottom": "24px"
|
"marginBottom": "24px"
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widgettype": "HBox",
|
||||||
|
"options": {
|
||||||
|
"width": "100%",
|
||||||
|
"gap": "12px"
|
||||||
|
},
|
||||||
|
"subwidgets": [
|
||||||
|
{
|
||||||
|
"widgettype": "Button",
|
||||||
|
"options": {
|
||||||
|
"label": "Create Session",
|
||||||
|
"bgcolor": "#22C55E",
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"border": "none",
|
||||||
|
"borderRadius": "6px",
|
||||||
|
"padding": "10px 20px",
|
||||||
|
"fontWeight": "600"
|
||||||
|
},
|
||||||
|
"binds": [
|
||||||
|
{
|
||||||
|
"wid": "self",
|
||||||
|
"event": "click",
|
||||||
|
"actiontype": "registerfunction",
|
||||||
|
"target": "app.new-session-container",
|
||||||
|
"rfname": "create_session",
|
||||||
|
"params": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widgettype": "HBox",
|
"widgettype": "Button",
|
||||||
"options": {
|
"options": {
|
||||||
"width": "100%",
|
"label": "Cancel",
|
||||||
"gap": "12px"
|
"bgcolor": "#64748B",
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"border": "none",
|
||||||
|
"borderRadius": "6px",
|
||||||
|
"padding": "10px 20px"
|
||||||
},
|
},
|
||||||
"subwidgets": [
|
"binds": [
|
||||||
{
|
{
|
||||||
"widgettype": "Button",
|
"wid": "self",
|
||||||
|
"event": "click",
|
||||||
|
"actiontype": "urlwidget",
|
||||||
|
"target": "app.main-content",
|
||||||
"options": {
|
"options": {
|
||||||
"label": "Create Session",
|
"url": "{{entire_url('index.ui')}}"
|
||||||
"bgcolor": "#22C55E",
|
|
||||||
"color": "#FFFFFF",
|
|
||||||
"border": "none",
|
|
||||||
"borderRadius": "6px",
|
|
||||||
"padding": "10px 20px",
|
|
||||||
"fontWeight": "600"
|
|
||||||
},
|
},
|
||||||
"binds": [
|
"mode": "replace"
|
||||||
{
|
|
||||||
"wid": "self",
|
|
||||||
"event": "click",
|
|
||||||
"actiontype": "registerfunction",
|
|
||||||
"target": "app.new-session-container",
|
|
||||||
"rfname": "create_session",
|
|
||||||
"params": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widgettype": "Button",
|
|
||||||
"options": {
|
|
||||||
"label": "Cancel",
|
|
||||||
"bgcolor": "#64748B",
|
|
||||||
"color": "#FFFFFF",
|
|
||||||
"border": "none",
|
|
||||||
"borderRadius": "6px",
|
|
||||||
"padding": "10px 20px"
|
|
||||||
},
|
|
||||||
"binds": [
|
|
||||||
{
|
|
||||||
"wid": "self",
|
|
||||||
"event": "click",
|
|
||||||
"actiontype": "urlwidget",
|
|
||||||
"target": "app.main-content",
|
|
||||||
"options": {
|
|
||||||
"url": "{{entire_url('index.ui')}}"
|
|
||||||
},
|
|
||||||
"mode": "replace"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user