1. global_menu.ui: 客户菜单首位添加dashboard菜单项 2. index.ui: sage_main_content默认子组件改为urlwidget直接加载dashboard, 解决已登录用户页面加载时user_logined事件不触发导致内容区空白的问题
184 lines
6.3 KiB
XML
184 lines
6.3 KiB
XML
{
|
|
"widgettype": "VBox",
|
|
"options": {
|
|
"css": "sage-shell",
|
|
"width": "100%",
|
|
"height": "100%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"css": "sage-topbar",
|
|
"width": "100%",
|
|
"height": "56px",
|
|
"padding": "0 16px",
|
|
"alignItems": "center"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "sidebar_toggle_btn",
|
|
"options": {
|
|
"css": "sidebar-toggle",
|
|
"label": "",
|
|
"width": "36px",
|
|
"height": "36px",
|
|
"padding": "0"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "script",
|
|
"target": "self",
|
|
"script": "sageToggleSidebar()"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "Image",
|
|
"options": {
|
|
"url": "{{entire_url('/imgs/ocai.svg')}}",
|
|
"height": "64px",
|
|
"marginLeft": "12px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Title4",
|
|
"options": {
|
|
"css": "sage-brand-title",
|
|
"text": "元境",
|
|
"fontWeight": "bold",
|
|
"marginLeft": "8px"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Filler"
|
|
},
|
|
{
|
|
"widgettype": "Button",
|
|
"id": "theme_toggle_btn",
|
|
"options": {
|
|
"css": "theme-toggle",
|
|
"label": "",
|
|
"width": "36px",
|
|
"height": "36px",
|
|
"padding": "0"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "script",
|
|
"target": "self",
|
|
"script": "sageToggleTheme()"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "urlwidget",
|
|
"options": {
|
|
"url": "{{entire_url('i18n/language.ui')}}"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Svg",
|
|
"options": {
|
|
"css": "clickable",
|
|
"rate": 2,
|
|
"tip": "显示所有已最小化的窗口",
|
|
"url": "{{entire_url('/bricks/imgs/app-dock.svg')}}"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "click",
|
|
"actiontype": "script",
|
|
"target": "app",
|
|
"script": "bricks.app.show_windows_panel(event)"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "urlwidget",
|
|
"options": {
|
|
"url": "{{entire_url('/rbac/user/user_panel.ui')}}"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "HBox",
|
|
"options": {
|
|
"width": "100%",
|
|
"height": "calc(100% - 56px)"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "VBox",
|
|
"id": "sage_sidebar",
|
|
"options": {
|
|
"css": "sage-sidebar",
|
|
"width": "240px",
|
|
"height": "100%"
|
|
},
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "urlwidget",
|
|
"options": {
|
|
"url": "{{entire_url('global_menu.ui')}}"
|
|
}
|
|
}
|
|
],
|
|
"binds": [
|
|
{
|
|
"wid": "app",
|
|
"event": "user_logined",
|
|
"actiontype": "script",
|
|
"target": "self",
|
|
"script": "sageReloadMenu()"
|
|
},
|
|
{
|
|
"wid": "app",
|
|
"event": "sage_logout",
|
|
"actiontype": "script",
|
|
"target": "self",
|
|
"script": "sageReloadMenu()"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"widgettype": "VBox",
|
|
"id": "sage_main_content",
|
|
"options": {
|
|
"css": "sage-main",
|
|
"height": "100%",
|
|
"padding": "24px"
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "app",
|
|
"event": "user_logined",
|
|
"actiontype": "urlwidget",
|
|
"target": "self",
|
|
"options": {
|
|
"url": "{{entire_url('/dashboard_for_sage/index.ui')}}"
|
|
},
|
|
"mode": "replace"
|
|
}
|
|
],
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "urlwidget",
|
|
"options": {
|
|
"url": "{{entire_url('/dashboard_for_sage/index.ui')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|