fix: correct Button控件属性和样式规范

- 将Button控件的'text'属性改为'label'(符合bricks-framework规范)
- 移除所有嵌套的'style'对象,将样式属性直接放在options顶层
- 确保所有UI文件符合bricks-framework最佳实践
This commit is contained in:
yumoqing 2026-04-22 11:43:08 +08:00
parent 5d4e70da8e
commit 09ec855576
10 changed files with 124 additions and 188 deletions

View File

@ -56,13 +56,13 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Add Service",
"icon": "fa fa-plus", "icon": "fa fa-plus",
"backgroundColor": "#22C55E", "backgroundColor": "#22C55E",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Add Service"
}, },
"binds": [ "binds": [
{ {
@ -76,12 +76,12 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Cancel",
"backgroundColor": "#64748B", "backgroundColor": "#64748B",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Cancel"
}, },
"binds": [ "binds": [
{ {

View File

@ -2,7 +2,7 @@
"widgettype": "PopupWindow", "widgettype": "PopupWindow",
"options": { "options": {
"title": "Hermes Chat", "title": "Hermes Chat",
"width": "800px", "width": "800px",
"height": "600px", "height": "600px",
"resizable": true, "resizable": true,
"draggable": true "draggable": true
@ -44,8 +44,8 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "发送", "width": "80px",
"width": "80px" "label": "发送"
}, },
"binds": [ "binds": [
{ {

View File

@ -3,9 +3,7 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "100%", "height": "100%",
"style": { "padding": "20px"
"padding": "20px"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -14,10 +12,8 @@
"text": "Edit Service", "text": "Edit Service",
"fontSize": "24px", "fontSize": "24px",
"fontWeight": "bold", "fontWeight": "bold",
"style": { "marginBottom": "20px",
"marginBottom": "20px", "color": "#F8FAFC"
"color": "#F8FAFC"
}
} }
}, },
{ {
@ -54,24 +50,20 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "auto", "height": "auto",
"style": { "marginTop": "20px",
"marginTop": "20px", "gap": "10px"
"gap": "10px"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Update Service",
"icon": "fa fa-save", "icon": "fa fa-save",
"style": { "label": "Update Service",
"backgroundColor": "#3B82F6", "backgroundColor": "#3B82F6",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px"
}
}, },
"binds": [ "binds": [
{ {
@ -85,14 +77,12 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Cancel", "label": "Cancel",
"style": { "backgroundColor": "#64748B",
"backgroundColor": "#64748B", "color": "#FFFFFF",
"color": "#FFFFFF", "border": "none",
"border": "none", "borderRadius": "6px",
"borderRadius": "6px", "padding": "10px 20px"
"padding": "10px 20px"
}
}, },
"binds": [ "binds": [
{ {

View File

@ -3,10 +3,8 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "100%", "height": "100%",
"style": { "backgroundColor": "#020617",
"backgroundColor": "#020617", "color": "#F8FAFC"
"color": "#F8FAFC"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -14,12 +12,10 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "60px", "height": "60px",
"style": { "backgroundColor": "#0F172A",
"backgroundColor": "#0F172A", "borderBottom": "1px solid #334155",
"borderBottom": "1px solid #334155", "padding": "0 20px",
"padding": "0 20px", "alignItems": "center"
"alignItems": "center"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -28,9 +24,7 @@
"text": "Hermes Web CLI", "text": "Hermes Web CLI",
"fontSize": "24px", "fontSize": "24px",
"fontWeight": "bold", "fontWeight": "bold",
"style": { "color": "#F8FAFC"
"color": "#F8FAFC"
}
} }
}, },
{ {
@ -39,15 +33,13 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "New Session",
"icon": "fa fa-plus", "icon": "fa fa-plus",
"style": { "label": "New Session",
"backgroundColor": "#22C55E", "backgroundColor": "#22C55E",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "8px 16px" "padding": "8px 16px"
}
}, },
"binds": [ "binds": [
{ {
@ -76,26 +68,22 @@
"options": { "options": {
"width": "250px", "width": "250px",
"height": "100%", "height": "100%",
"style": { "backgroundColor": "#1A1E2F",
"backgroundColor": "#1A1E2F", "borderRight": "1px solid #334155"
"borderRight": "1px solid #334155"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Active Sessions",
"icon": "fa fa-comments", "icon": "fa fa-comments",
"style": { "label": "Active Sessions",
"width": "100%", "width": "100%",
"textAlign": "left", "textAlign": "left",
"padding": "12px 20px", "padding": "12px 20px",
"border": "none", "border": "none",
"backgroundColor": "transparent", "backgroundColor": "transparent",
"color": "#F8FAFC", "color": "#F8FAFC",
"fontSize": "14px" "fontSize": "14px"
}
}, },
"binds": [ "binds": [
{ {
@ -113,17 +101,15 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Services",
"icon": "fa fa-server", "icon": "fa fa-server",
"style": { "label": "Services",
"width": "100%", "width": "100%",
"textAlign": "left", "textAlign": "left",
"padding": "12px 20px", "padding": "12px 20px",
"border": "none", "border": "none",
"backgroundColor": "transparent", "backgroundColor": "transparent",
"color": "#F8FAFC", "color": "#F8FAFC",
"fontSize": "14px" "fontSize": "14px"
}
}, },
"binds": [ "binds": [
{ {
@ -141,17 +127,15 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Settings",
"icon": "fa fa-cog", "icon": "fa fa-cog",
"style": { "label": "Settings",
"width": "100%", "width": "100%",
"textAlign": "left", "textAlign": "left",
"padding": "12px 20px", "padding": "12px 20px",
"border": "none", "border": "none",
"backgroundColor": "transparent", "backgroundColor": "transparent",
"color": "#F8FAFC", "color": "#F8FAFC",
"fontSize": "14px" "fontSize": "14px"
}
}, },
"binds": [ "binds": [
{ {
@ -174,9 +158,7 @@
"options": { "options": {
"width": "calc(100% - 250px)", "width": "calc(100% - 250px)",
"height": "100%", "height": "100%",
"style": { "padding": "20px"
"padding": "20px"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -185,10 +167,8 @@
"text": "Welcome to Hermes Web CLI", "text": "Welcome to Hermes Web CLI",
"fontSize": "28px", "fontSize": "28px",
"fontWeight": "bold", "fontWeight": "bold",
"style": { "marginBottom": "16px",
"marginBottom": "16px", "color": "#F8FAFC"
"color": "#F8FAFC"
}
} }
}, },
{ {
@ -196,10 +176,8 @@
"options": { "options": {
"text": "Interact with your AI agents through natural language conversations. Create new sessions, manage connected services, and configure your workspace.", "text": "Interact with your AI agents through natural language conversations. Create new sessions, manage connected services, and configure your workspace.",
"fontSize": "16px", "fontSize": "16px",
"style": { "marginBottom": "24px",
"marginBottom": "24px", "color": "#CBD5E1"
"color": "#CBD5E1"
}
} }
}, },
{ {
@ -207,9 +185,7 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "auto", "height": "auto",
"style": { "gap": "20px"
"gap": "20px"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -217,12 +193,10 @@
"options": { "options": {
"width": "33%", "width": "33%",
"height": "120px", "height": "120px",
"style": { "backgroundColor": "#1E293B",
"backgroundColor": "#1E293B", "borderRadius": "8px",
"borderRadius": "8px", "padding": "20px",
"padding": "20px", "border": "1px solid #334155"
"border": "1px solid #334155"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -231,10 +205,8 @@
"text": "Quick Start", "text": "Quick Start",
"fontSize": "18px", "fontSize": "18px",
"fontWeight": "600", "fontWeight": "600",
"style": { "color": "#F8FAFC",
"color": "#F8FAFC", "marginBottom": "8px"
"marginBottom": "8px"
}
} }
}, },
{ {
@ -242,9 +214,7 @@
"options": { "options": {
"text": "Create your first session and start chatting with your AI agent.", "text": "Create your first session and start chatting with your AI agent.",
"fontSize": "14px", "fontSize": "14px",
"style": { "color": "#94A3B8"
"color": "#94A3B8"
}
} }
} }
] ]
@ -254,12 +224,10 @@
"options": { "options": {
"width": "33%", "width": "33%",
"height": "120px", "height": "120px",
"style": { "backgroundColor": "#1E293B",
"backgroundColor": "#1E293B", "borderRadius": "8px",
"borderRadius": "8px", "padding": "20px",
"padding": "20px", "border": "1px solid #334155"
"border": "1px solid #334155"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -268,10 +236,8 @@
"text": "Service Management", "text": "Service Management",
"fontSize": "18px", "fontSize": "18px",
"fontWeight": "600", "fontWeight": "600",
"style": { "color": "#F8FAFC",
"color": "#F8FAFC", "marginBottom": "8px"
"marginBottom": "8px"
}
} }
}, },
{ {
@ -279,9 +245,7 @@
"options": { "options": {
"text": "Connect and manage multiple Hermes services for distributed AI processing.", "text": "Connect and manage multiple Hermes services for distributed AI processing.",
"fontSize": "14px", "fontSize": "14px",
"style": { "color": "#94A3B8"
"color": "#94A3B8"
}
} }
} }
] ]
@ -291,12 +255,10 @@
"options": { "options": {
"width": "33%", "width": "33%",
"height": "120px", "height": "120px",
"style": { "backgroundColor": "#1E293B",
"backgroundColor": "#1E293B", "borderRadius": "8px",
"borderRadius": "8px", "padding": "20px",
"padding": "20px", "border": "1px solid #334155"
"border": "1px solid #334155"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -305,10 +267,8 @@
"text": "Session History", "text": "Session History",
"fontSize": "18px", "fontSize": "18px",
"fontWeight": "600", "fontWeight": "600",
"style": { "color": "#F8FAFC",
"color": "#F8FAFC", "marginBottom": "8px"
"marginBottom": "8px"
}
} }
}, },
{ {
@ -316,9 +276,7 @@
"options": { "options": {
"text": "Access your conversation history and continue previous sessions.", "text": "Access your conversation history and continue previous sessions.",
"fontSize": "14px", "fontSize": "14px",
"style": { "color": "#94A3B8"
"color": "#94A3B8"
}
} }
} }
] ]
@ -331,11 +289,9 @@
"text": "Recent Sessions", "text": "Recent Sessions",
"fontSize": "20px", "fontSize": "20px",
"fontWeight": "600", "fontWeight": "600",
"style": { "marginTop": "32px",
"marginTop": "32px", "marginBottom": "16px",
"marginBottom": "16px", "color": "#F8FAFC"
"color": "#F8FAFC"
}
} }
}, },
{ {

View File

@ -50,13 +50,13 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Create Session",
"icon": "fa fa-plus", "icon": "fa fa-plus",
"backgroundColor": "#22C55E", "backgroundColor": "#22C55E",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Create Session"
}, },
"binds": [ "binds": [
{ {
@ -70,12 +70,12 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Cancel",
"backgroundColor": "#64748B", "backgroundColor": "#64748B",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Cancel"
}, },
"binds": [ "binds": [
{ {

View File

@ -4,14 +4,14 @@
"title": "服务详情", "title": "服务详情",
"fields": [ "fields": [
{ {
"name": "name", "name": "name",
"label": "服务名称", "label": "服务名称",
"uitype": "str", "uitype": "str",
"required": true "required": true
}, },
{ {
"name": "service_url", "name": "service_url",
"label": "服务地址", "label": "服务地址",
"uitype": "str", "uitype": "str",
"required": true "required": true
}, },
@ -27,7 +27,7 @@
{ {
"wid": "self", "wid": "self",
"event": "submited", "event": "submited",
"actiontype": "script", "actiontype": "script",
"script": "await bricks.show_resp_message_or_error(event.params)" "script": "await bricks.show_resp_message_or_error(event.params)"
} }
] ]

View File

@ -19,14 +19,14 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Add New Service",
"icon": "fa fa-plus", "icon": "fa fa-plus",
"backgroundColor": "#22C55E", "backgroundColor": "#22C55E",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px", "padding": "10px 20px",
"marginBottom": "20px" "marginBottom": "20px",
"label": "Add New Service"
}, },
"binds": [ "binds": [
{ {

View File

@ -3,9 +3,7 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "100%", "height": "100%",
"style": { "padding": "20px"
"padding": "20px"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -13,9 +11,7 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "auto", "height": "auto",
"style": { "marginBottom": "24px"
"marginBottom": "24px"
}
}, },
"subwidgets": [ "subwidgets": [
{ {
@ -24,9 +20,7 @@
"text": "Session Chat", "text": "Session Chat",
"fontSize": "24px", "fontSize": "24px",
"fontWeight": "bold", "fontWeight": "bold",
"style": { "color": "#F8FAFC"
"color": "#F8FAFC"
}
} }
}, },
{ {
@ -35,15 +29,13 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Back to Sessions",
"icon": "fa fa-arrow-left", "icon": "fa fa-arrow-left",
"style": { "label": "Back to Sessions",
"backgroundColor": "#1E293B", "backgroundColor": "#1E293B",
"color": "#F8FAFC", "color": "#F8FAFC",
"border": "1px solid #334155", "border": "1px solid #334155",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "8px 16px" "padding": "8px 16px"
}
}, },
"binds": [ "binds": [
{ {
@ -65,13 +57,11 @@
"options": { "options": {
"width": "100%", "width": "100%",
"height": "calc(100% - 100px)", "height": "calc(100% - 100px)",
"style": { "backgroundColor": "#1E293B",
"backgroundColor": "#1E293B", "borderRadius": "8px",
"borderRadius": "8px", "padding": "20px",
"padding": "20px", "border": "1px solid #334155",
"border": "1px solid #334155", "overflow": "auto"
"overflow": "auto"
}
}, },
"subwidgets": [ "subwidgets": [
{ {

View File

@ -70,13 +70,13 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Send",
"icon": "fa fa-paper-plane", "icon": "fa fa-paper-plane",
"backgroundColor": "#22C55E", "backgroundColor": "#22C55E",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Send"
}, },
"binds": [ "binds": [
{ {
@ -90,12 +90,12 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Back to Sessions",
"backgroundColor": "#64748B", "backgroundColor": "#64748B",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Back to Sessions"
}, },
"binds": [ "binds": [
{ {

View File

@ -60,13 +60,13 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Save Settings",
"icon": "fa fa-save", "icon": "fa fa-save",
"backgroundColor": "#3B82F6", "backgroundColor": "#3B82F6",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Save Settings"
}, },
"binds": [ "binds": [
{ {
@ -80,12 +80,12 @@
{ {
"widgettype": "Button", "widgettype": "Button",
"options": { "options": {
"text": "Reset to Defaults",
"backgroundColor": "#EF4444", "backgroundColor": "#EF4444",
"color": "#FFFFFF", "color": "#FFFFFF",
"border": "none", "border": "none",
"borderRadius": "6px", "borderRadius": "6px",
"padding": "10px 20px" "padding": "10px 20px",
"label": "Reset to Defaults"
}, },
"binds": [ "binds": [
{ {