hermes-web-cli/wwwroot/service-list-item.ui
yumoqing 3edfa140e9 Fix bricks framework API usage and file structure
- Move all JS files from wwwroot/scripts/ to wwwroot/ root directory to comply with ahserver requirements
- Fix component registration: use bricks.Factory.register() instead of bricks.register()
- Fix function registration: use bricks.RF.register() instead of bricks.registerFunction()
- Update UI files to use item_template_url with external templates for List components
- Add proper list item template files (session-list-item.ui, service-list-item.ui, model-list-item.ui)
- Ensure all custom components and functions use correct bricks framework API
2026-04-22 15:49:36 +08:00

139 lines
3.4 KiB
XML

{
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"padding": "16px",
"border": "1px solid #334155",
"borderRadius": "8px",
"bgcolor": "#1E293B"
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"width": "100%",
"alignItems": "center",
"marginBottom": "8px"
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"text": "{{item.name}}",
"fontSize": "18px",
"fontWeight": "600",
"color": "#F8FAFC"
}
},
{
"widgettype": "Filler"
},
{
"widgettype": "Badge",
"options": {
"text": "{{item.status}}",
"bgcolor": "{{ '#22C55E' if item.status == 'Connected' else '#EF4444' }}",
"color": "#FFFFFF",
"borderRadius": "12px",
"padding": "4px 12px",
"fontSize": "12px"
}
}
]
},
{
"widgettype": "Text",
"options": {
"text": "{{item.endpoint}}",
"fontSize": "14px",
"color": "#CBD5E1",
"marginBottom": "8px"
}
},
{
"widgettype": "HBox",
"options": {
"width": "100%",
"gap": "12px"
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"label": "Edit",
"bgcolor": "#3B82F6",
"color": "#FFFFFF",
"border": "none",
"borderRadius": "4px",
"padding": "6px 12px",
"fontSize": "12px"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.main-content",
"options": {
"url": "{{entire_url('edit_service.ui')}}",
"params": {
"service_id": "{{item.id}}"
}
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "Remove",
"bgcolor": "#EF4444",
"color": "#FFFFFF",
"border": "none",
"borderRadius": "4px",
"padding": "6px 12px",
"fontSize": "12px"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "registerfunction",
"target": "self",
"rfname": "remove_service",
"params": {
"service_id": "{{item.id}}"
}
}
]
},
{
"widgettype": "Button",
"options": {
"label": "Test Connection",
"bgcolor": "#8B5CF6",
"color": "#FFFFFF",
"border": "none",
"borderRadius": "4px",
"padding": "6px 12px",
"fontSize": "12px"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "registerfunction",
"target": "self",
"rfname": "test_service_connection",
"params": {
"service_id": "{{item.id}}"
}
}
]
}
]
}
]
}