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"
}
},
"subwidgets": [
{
@ -14,11 +12,9 @@
"text": "Edit Service",
"fontSize": "24px",
"fontWeight": "bold",
"style": {
"marginBottom": "20px",
"color": "#F8FAFC"
}
}
},
{
"widgettype": "Form",
@ -54,24 +50,20 @@
"options": {
"width": "100%",
"height": "auto",
"style": {
"marginTop": "20px",
"gap": "10px"
}
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"text": "Update Service",
"icon": "fa fa-save",
"style": {
"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": {
"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"
}
},
"subwidgets": [
{
@ -14,12 +12,10 @@
"options": {
"width": "100%",
"height": "60px",
"style": {
"backgroundColor": "#0F172A",
"borderBottom": "1px solid #334155",
"padding": "0 20px",
"alignItems": "center"
}
},
"subwidgets": [
{
@ -28,10 +24,8 @@
"text": "Hermes Web CLI",
"fontSize": "24px",
"fontWeight": "bold",
"style": {
"color": "#F8FAFC"
}
}
},
{
"widgettype": "Filler"
@ -39,15 +33,13 @@
{
"widgettype": "Button",
"options": {
"text": "New Session",
"icon": "fa fa-plus",
"style": {
"label": "New Session",
"backgroundColor": "#22C55E",
"color": "#FFFFFF",
"border": "none",
"borderRadius": "6px",
"padding": "8px 16px"
}
},
"binds": [
{
@ -76,18 +68,15 @@
"options": {
"width": "250px",
"height": "100%",
"style": {
"backgroundColor": "#1A1E2F",
"borderRight": "1px solid #334155"
}
},
"subwidgets": [
{
"widgettype": "Button",
"options": {
"text": "Active Sessions",
"icon": "fa fa-comments",
"style": {
"label": "Active Sessions",
"width": "100%",
"textAlign": "left",
"padding": "12px 20px",
@ -95,7 +84,6 @@
"backgroundColor": "transparent",
"color": "#F8FAFC",
"fontSize": "14px"
}
},
"binds": [
{
@ -113,9 +101,8 @@
{
"widgettype": "Button",
"options": {
"text": "Services",
"icon": "fa fa-server",
"style": {
"label": "Services",
"width": "100%",
"textAlign": "left",
"padding": "12px 20px",
@ -123,7 +110,6 @@
"backgroundColor": "transparent",
"color": "#F8FAFC",
"fontSize": "14px"
}
},
"binds": [
{
@ -141,9 +127,8 @@
{
"widgettype": "Button",
"options": {
"text": "Settings",
"icon": "fa fa-cog",
"style": {
"label": "Settings",
"width": "100%",
"textAlign": "left",
"padding": "12px 20px",
@ -151,7 +136,6 @@
"backgroundColor": "transparent",
"color": "#F8FAFC",
"fontSize": "14px"
}
},
"binds": [
{
@ -174,9 +158,7 @@
"options": {
"width": "calc(100% - 250px)",
"height": "100%",
"style": {
"padding": "20px"
}
},
"subwidgets": [
{
@ -185,31 +167,25 @@
"text": "Welcome to Hermes Web CLI",
"fontSize": "28px",
"fontWeight": "bold",
"style": {
"marginBottom": "16px",
"color": "#F8FAFC"
}
}
},
{
"widgettype": "Text",
"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"
}
}
},
{
"widgettype": "HBox",
"options": {
"width": "100%",
"height": "auto",
"style": {
"gap": "20px"
}
},
"subwidgets": [
{
@ -217,12 +193,10 @@
"options": {
"width": "33%",
"height": "120px",
"style": {
"backgroundColor": "#1E293B",
"borderRadius": "8px",
"padding": "20px",
"border": "1px solid #334155"
}
},
"subwidgets": [
{
@ -231,22 +205,18 @@
"text": "Quick Start",
"fontSize": "18px",
"fontWeight": "600",
"style": {
"color": "#F8FAFC",
"marginBottom": "8px"
}
}
},
{
"widgettype": "Text",
"options": {
"text": "Create your first session and start chatting with your AI agent.",
"fontSize": "14px",
"style": {
"color": "#94A3B8"
}
}
}
]
},
{
@ -254,12 +224,10 @@
"options": {
"width": "33%",
"height": "120px",
"style": {
"backgroundColor": "#1E293B",
"borderRadius": "8px",
"padding": "20px",
"border": "1px solid #334155"
}
},
"subwidgets": [
{
@ -268,22 +236,18 @@
"text": "Service Management",
"fontSize": "18px",
"fontWeight": "600",
"style": {
"color": "#F8FAFC",
"marginBottom": "8px"
}
}
},
{
"widgettype": "Text",
"options": {
"text": "Connect and manage multiple Hermes services for distributed AI processing.",
"fontSize": "14px",
"style": {
"color": "#94A3B8"
}
}
}
]
},
{
@ -291,12 +255,10 @@
"options": {
"width": "33%",
"height": "120px",
"style": {
"backgroundColor": "#1E293B",
"borderRadius": "8px",
"padding": "20px",
"border": "1px solid #334155"
}
},
"subwidgets": [
{
@ -305,22 +267,18 @@
"text": "Session History",
"fontSize": "18px",
"fontWeight": "600",
"style": {
"color": "#F8FAFC",
"marginBottom": "8px"
}
}
},
{
"widgettype": "Text",
"options": {
"text": "Access your conversation history and continue previous sessions.",
"fontSize": "14px",
"style": {
"color": "#94A3B8"
}
}
}
]
}
]
@ -331,12 +289,10 @@
"text": "Recent Sessions",
"fontSize": "20px",
"fontWeight": "600",
"style": {
"marginTop": "32px",
"marginBottom": "16px",
"color": "#F8FAFC"
}
}
},
{
"widgettype": "DataViewer",

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"
}
},
"subwidgets": [
{
@ -13,9 +11,7 @@
"options": {
"width": "100%",
"height": "auto",
"style": {
"marginBottom": "24px"
}
},
"subwidgets": [
{
@ -24,10 +20,8 @@
"text": "Session Chat",
"fontSize": "24px",
"fontWeight": "bold",
"style": {
"color": "#F8FAFC"
}
}
},
{
"widgettype": "Filler"
@ -35,15 +29,13 @@
{
"widgettype": "Button",
"options": {
"text": "Back to Sessions",
"icon": "fa fa-arrow-left",
"style": {
"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"
}
},
"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": [
{