224 lines
9.0 KiB
XML

{% set roles = get_user_roles(get_user()) %}
{% set role_str = roles|join(',') %}
{% set is_customer = 'customer.' in role_str %}
{% set is_admin = 'owner.superuser' in roles or 'reseller.operator' in roles %}
{
"widgettype": "HBox",
"options": {
"width": "100%",
"height": "100%",
"spacing": 0
},
"subwidgets": [
{
"widgettype": "VScrollPanel",
"options": {
"cwidth": 18,
"bgcolor": "#1e293b"
},
"subwidgets": [
{
"widgettype": "VBox",
"options": {
"padding": "16px",
"spacing": 8
},
"subwidgets": [
{
"widgettype": "Title5",
"options": {
"text": "真人素材",
"color": "#94a3b8"
}
}
{% if is_customer or is_admin %}
,{
"widgettype": "Button",
"options": {
"label": "🔐 真人认证",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('create_validate.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "📤 上传素材",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('upload_asset.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "🖼️ 查看素材",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('view_assets.ui')}}"
},
"mode": "replace"
}
]
}
{% endif %}
{% if is_admin %}
,{
"widgettype": "VBox",
"options": {
"padding": "12px 0 8px",
"spacing": 0
},
"subwidgets": [
{
"widgettype": "Title5",
"options": {
"text": "管理功能",
"color": "#94a3b8"
}
}
]
},
{
"widgettype": "Button",
"options": {
"label": "📁 素材组合管理",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('group_manage.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "🖼️ 素材资产管理",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('asset_manage.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "⚙️ 供应商配置",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('vendor_config_manage.ui')}}"
},
"mode": "replace"
}
]
},
{
"widgettype": "Button",
"options": {
"label": "🔗 机构映射管理",
"width": "100%",
"textAlign": "left"
},
"binds": [
{
"wid": "self",
"event": "click",
"actiontype": "urlwidget",
"target": "app.rl_content",
"options": {
"url": "{{entire_url('org_group_manage.ui')}}"
},
"mode": "replace"
}
]
}
{% endif %}
]
}
]
},
{
"widgettype": "VBox",
"options": {
"css": "filler",
"padding": "20px"
},
"subwidgets": [
{
"widgettype": "VScrollPanel",
"options": {
"css": "filler"
},
"subwidgets": [
{
"widgettype": "VBox",
"id": "rl_content",
"options": {
"width": "100%"
}
}
]
}
]
}
]
}