fix: flatten style to options, remove invalid actiontype, fix Button/Text widget properties
- Flatten nested style objects directly into options (bricks doesn't recognize 'style')
- Remove invalid 'formsubmit' actiontype from login.ui binds
- Text/Title use 'text', Button uses 'label'
- All paths use {{entire_url()}}
This commit is contained in:
parent
282c1780ba
commit
fe5bb67d1c
215
wwwroot/base.ui
215
wwwroot/base.ui
@ -1,55 +1,168 @@
|
||||
{
|
||||
"type": "Page",
|
||||
"title": "CRM Dashboard",
|
||||
"content": {
|
||||
"type": "HBox",
|
||||
"style": {"height": "100vh"},
|
||||
"children": [
|
||||
{
|
||||
"type": "Drawer",
|
||||
"id": "navDrawer",
|
||||
"width": 220,
|
||||
"variant": "permanent",
|
||||
"style": {"backgroundColor": "#1a1a2e"},
|
||||
"content": {
|
||||
"type": "VBox",
|
||||
"gap": 4,
|
||||
"style": {"padding": "8px"},
|
||||
"children": [
|
||||
{"type": "Text", "content": "CRM System", "style": {"color": "#fff", "fontSize": "18px", "fontWeight": "bold", "padding": "12px 8px"}},
|
||||
{"type": "Divider", "style": {"backgroundColor": "#333", "margin": "8px 0"}},
|
||||
{"type": "ListTile", "id": "nav_customer", "leading": "people", "title": "Customer Mgmt", "style": {"color": "#ccc"}, "onclick": "navigate('main/customer_management/base.ui')"},
|
||||
{"type": "ListTile", "id": "nav_opportunity", "leading": "trending_up", "title": "Opportunity Mgmt", "style": {"color": "#ccc"}, "onclick": "navigate('main/opportunity_management/opportunity_management.ui')"},
|
||||
{"type": "ListTile", "id": "nav_contract", "leading": "description", "title": "Contract Mgmt", "style": {"color": "#ccc"}, "onclick": "navigate('main/contract_management/contract_list.ui')"},
|
||||
{"type": "ListTile", "id": "nav_financial", "leading": "account_balance", "title": "Financial Mgmt", "style": {"color": "#ccc"}, "onclick": "navigate('main/financial_management/receivables.ui')"},
|
||||
{"type": "Divider", "style": {"backgroundColor": "#333", "margin": "8px 0"}},
|
||||
{"type": "ListTile", "id": "nav_workflow", "leading": "approval", "title": "Workflow Approval", "style": {"color": "#ccc"}, "onclick": "navigate('main/workflow_approval/base.ui')"},
|
||||
{"type": "Divider", "style": {"backgroundColor": "#333", "margin": "8px 0"}},
|
||||
{"type": "ListTile", "id": "nav_admin", "leading": "admin_panel_settings", "title": "Admin", "style": {"color": "#ccc"}, "onclick": "navigate('main/rbac/admin_menu.ui')"},
|
||||
{"type": "ListTile", "id": "nav_logout", "leading": "logout", "title": "Logout", "style": {"color": "#f44336"}, "onclick": "navigate('/logout')"}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "VBox",
|
||||
"style": {"flex": 1, "backgroundColor": "#f5f5f5"},
|
||||
"type": "Page",
|
||||
"title": "CRM Dashboard",
|
||||
"content": {
|
||||
"type": "HBox",
|
||||
"style": {
|
||||
"height": "100vh"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "AppBar",
|
||||
"title": "CRM Dashboard",
|
||||
"style": {"backgroundColor": "#16213e", "color": "#fff"},
|
||||
"actions": [
|
||||
{"type": "Text", "id": "currentUser", "content": "User", "style": {"color": "#fff", "marginRight": "16px"}}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "IFrame",
|
||||
"id": "contentFrame",
|
||||
"src": "",
|
||||
"style": {"flex": 1, "border": "none"}
|
||||
}
|
||||
{
|
||||
"type": "Drawer",
|
||||
"id": "navDrawer",
|
||||
"width": 220,
|
||||
"variant": "permanent",
|
||||
"style": {
|
||||
"backgroundColor": "#1a1a2e"
|
||||
},
|
||||
"content": {
|
||||
"type": "VBox",
|
||||
"gap": 4,
|
||||
"style": {
|
||||
"padding": "8px"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "Text",
|
||||
"content": "CRM System",
|
||||
"style": {
|
||||
"color": "#fff",
|
||||
"fontSize": "18px",
|
||||
"fontWeight": "bold",
|
||||
"padding": "12px 8px"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Divider",
|
||||
"style": {
|
||||
"backgroundColor": "#333",
|
||||
"margin": "8px 0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ListTile",
|
||||
"id": "nav_customer",
|
||||
"leading": "people",
|
||||
"title": "Customer Mgmt",
|
||||
"style": {
|
||||
"color": "#ccc"
|
||||
},
|
||||
"onclick": "navigate('main/customer_management/base.ui')"
|
||||
},
|
||||
{
|
||||
"type": "ListTile",
|
||||
"id": "nav_opportunity",
|
||||
"leading": "trending_up",
|
||||
"title": "Opportunity Mgmt",
|
||||
"style": {
|
||||
"color": "#ccc"
|
||||
},
|
||||
"onclick": "navigate('main/opportunity_management/opportunity_management.ui')"
|
||||
},
|
||||
{
|
||||
"type": "ListTile",
|
||||
"id": "nav_contract",
|
||||
"leading": "description",
|
||||
"title": "Contract Mgmt",
|
||||
"style": {
|
||||
"color": "#ccc"
|
||||
},
|
||||
"onclick": "navigate('main/contract_management/contract_list.ui')"
|
||||
},
|
||||
{
|
||||
"type": "ListTile",
|
||||
"id": "nav_financial",
|
||||
"leading": "account_balance",
|
||||
"title": "Financial Mgmt",
|
||||
"style": {
|
||||
"color": "#ccc"
|
||||
},
|
||||
"onclick": "navigate('main/financial_management/receivables.ui')"
|
||||
},
|
||||
{
|
||||
"type": "Divider",
|
||||
"style": {
|
||||
"backgroundColor": "#333",
|
||||
"margin": "8px 0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ListTile",
|
||||
"id": "nav_workflow",
|
||||
"leading": "approval",
|
||||
"title": "Workflow Approval",
|
||||
"style": {
|
||||
"color": "#ccc"
|
||||
},
|
||||
"onclick": "navigate('main/workflow_approval/base.ui')"
|
||||
},
|
||||
{
|
||||
"type": "Divider",
|
||||
"style": {
|
||||
"backgroundColor": "#333",
|
||||
"margin": "8px 0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ListTile",
|
||||
"id": "nav_admin",
|
||||
"leading": "admin_panel_settings",
|
||||
"title": "Admin",
|
||||
"style": {
|
||||
"color": "#ccc"
|
||||
},
|
||||
"onclick": "navigate('main/rbac/admin_menu.ui')"
|
||||
},
|
||||
{
|
||||
"type": "ListTile",
|
||||
"id": "nav_logout",
|
||||
"leading": "logout",
|
||||
"title": "Logout",
|
||||
"style": {
|
||||
"color": "#f44336"
|
||||
},
|
||||
"onclick": "navigate('/logout')"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "VBox",
|
||||
"style": {
|
||||
"flex": 1,
|
||||
"backgroundColor": "#f5f5f5"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "AppBar",
|
||||
"title": "CRM Dashboard",
|
||||
"style": {
|
||||
"backgroundColor": "#16213e",
|
||||
"color": "#fff"
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"type": "Text",
|
||||
"id": "currentUser",
|
||||
"content": "User",
|
||||
"style": {
|
||||
"color": "#fff",
|
||||
"marginRight": "16px"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "IFrame",
|
||||
"id": "contentFrame",
|
||||
"src": "",
|
||||
"style": {
|
||||
"flex": 1,
|
||||
"border": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4,34 +4,28 @@
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100vh",
|
||||
"style": {
|
||||
"margin": "0",
|
||||
"padding": "0"
|
||||
}
|
||||
"margin": "0",
|
||||
"padding": "0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"height": "56px",
|
||||
"style": {
|
||||
"background": "#1a73e8",
|
||||
"color": "white",
|
||||
"alignItems": "center",
|
||||
"padding": "0 16px",
|
||||
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
|
||||
}
|
||||
"background": "#1a73e8",
|
||||
"color": "white",
|
||||
"alignItems": "center",
|
||||
"padding": "0 16px",
|
||||
"boxShadow": "0 2px 4px rgba(0,0,0,0.1)"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"style": {
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold",
|
||||
"color": "white"
|
||||
},
|
||||
"text": "CRM系统"
|
||||
"text": "CRM系统",
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold",
|
||||
"color": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -42,11 +36,9 @@
|
||||
"widgettype": "Text",
|
||||
"id": "lbl_username",
|
||||
"options": {
|
||||
"style": {
|
||||
"color": "white",
|
||||
"marginRight": "16px"
|
||||
},
|
||||
"text": "用户: admin"
|
||||
"text": "用户: admin",
|
||||
"color": "white",
|
||||
"marginRight": "16px"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -55,9 +47,7 @@
|
||||
"options": {
|
||||
"label": "退出登录",
|
||||
"variant": "text",
|
||||
"style": {
|
||||
"color": "white"
|
||||
}
|
||||
"color": "white"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -66,21 +56,17 @@
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"flex": 1,
|
||||
"style": {
|
||||
"overflow": "hidden"
|
||||
}
|
||||
"overflow": "hidden"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "220px",
|
||||
"style": {
|
||||
"background": "#f5f5f5",
|
||||
"borderRight": "1px solid #e0e0e0",
|
||||
"overflowY": "auto",
|
||||
"padding": "8px 0"
|
||||
}
|
||||
"background": "#f5f5f5",
|
||||
"borderRight": "1px solid #e0e0e0",
|
||||
"overflowY": "auto",
|
||||
"padding": "8px 0"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
@ -125,9 +111,7 @@
|
||||
"url": "{{entire_url('/workflow_approval')}}"
|
||||
}
|
||||
],
|
||||
"style": {
|
||||
"width": "100%"
|
||||
}
|
||||
"width": "100%"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -136,10 +120,8 @@
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"flex": 1,
|
||||
"style": {
|
||||
"overflow": "hidden",
|
||||
"background": "#fafafa"
|
||||
}
|
||||
"overflow": "hidden",
|
||||
"background": "#fafafa"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
@ -149,9 +131,7 @@
|
||||
"url": "{{entire_url('/unified_dashboard')}}",
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"style": {
|
||||
"border": "none"
|
||||
}
|
||||
"border": "none"
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -163,11 +143,11 @@
|
||||
{
|
||||
"wid": "btn_logout",
|
||||
"event": "click",
|
||||
"actiontype": "fetch",
|
||||
"actiontype": "urlwidget",
|
||||
"url": "{{entire_url('api/logout.dspy')}}",
|
||||
"method": "POST",
|
||||
"callback": {
|
||||
"success": "navigate('/login.ui')"
|
||||
"target": "body/app",
|
||||
"options": {
|
||||
"method": "POST"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -4,36 +4,30 @@
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100vh",
|
||||
"style": {
|
||||
"background": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center"
|
||||
}
|
||||
"background": "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
||||
"alignItems": "center",
|
||||
"justifyContent": "center"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "400px",
|
||||
"style": {
|
||||
"background": "white",
|
||||
"borderRadius": "12px",
|
||||
"boxShadow": "0 8px 32px rgba(0,0,0,0.15)",
|
||||
"padding": "40px 32px"
|
||||
}
|
||||
"background": "white",
|
||||
"borderRadius": "12px",
|
||||
"boxShadow": "0 8px 32px rgba(0,0,0,0.15)",
|
||||
"padding": "40px 32px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"style": {
|
||||
"fontSize": "24px",
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center",
|
||||
"marginBottom": "24px",
|
||||
"color": "#333"
|
||||
},
|
||||
"text": "CRM系统登录"
|
||||
"text": "CRM系统登录",
|
||||
"fontSize": "24px",
|
||||
"fontWeight": "bold",
|
||||
"textAlign": "center",
|
||||
"marginBottom": "24px",
|
||||
"color": "#333"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -66,11 +60,9 @@
|
||||
{
|
||||
"widgettype": "HBox",
|
||||
"options": {
|
||||
"style": {
|
||||
"justifyContent": "center",
|
||||
"marginTop": "16px",
|
||||
"gap": "16px"
|
||||
}
|
||||
"justifyContent": "center",
|
||||
"marginTop": "16px",
|
||||
"gap": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
@ -86,15 +78,5 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"binds": [
|
||||
{
|
||||
"wid": "login_form",
|
||||
"event": "submit",
|
||||
"actiontype": "formsubmit",
|
||||
"callback": {
|
||||
"success": "navigate('/index.ui')"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user