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

View File

@ -44,8 +44,8 @@
{
"widgettype": "Button",
"options": {
"text": "发送",
"width": "80px"
"width": "80px",
"label": "发送"
},
"binds": [
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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