192 lines
6.8 KiB
XML
192 lines
6.8 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": "Svg",
|
|
"id": "tenant_logo",
|
|
"options": {
|
|
"css": "sage-logo",
|
|
"rate": 2,
|
|
"url": "{{entire_url('/imgs/ocai.svg')}}"
|
|
}
|
|
},
|
|
{
|
|
"widgettype": "Title4",
|
|
"id": "tenant_brand_title",
|
|
"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')}}"
|
|
}
|
|
}
|
|
],
|
|
"binds": [
|
|
{
|
|
"wid": "app",
|
|
"event": "user_logined",
|
|
"actiontype": "script",
|
|
"target": "self",
|
|
"script": "fetch('{{entire_url('/tenant_brand_data.dspy')}}').then(r=>r.json()).then(d=>{var l=bricks.getWidgetById('tenant_logo',bricks.app);if(l&&d.iconid)l.opts.url='{{entire_url('/appbase/show_icon.dspy')}}?id='+d.iconid;l.refresh();var t=bricks.getWidgetById('tenant_brand_title',bricks.app);if(t)t.opts.text=d.orgname;t.refresh();})"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"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": "script",
|
|
"target": "self",
|
|
"script": "sageOnLogin('{{entire_url('/sage_datamart/index.ui')}}')"
|
|
}
|
|
],
|
|
"subwidgets": [
|
|
{
|
|
"widgettype": "urlwidget",
|
|
"options": {
|
|
"url": "{{entire_url('/sage_datamart/index.ui')}}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|