rbac/wwwroot/user/user.ui

80 lines
1.2 KiB
Plaintext
Raw Normal View History

2025-01-03 16:24:32 +08:00
{% if get_user() %}
{
"widgettype":"HBox",
"options":{
"css":"clickable",
2025-01-21 17:46:32 +08:00
"cwidth":10
},
"binds":[
{
"wid":"self",
"event":"click",
"actiontype":"urlwidget",
"popup_options":{
"eventpos":true,
"dismiss_events":["command"]
2025-01-03 16:24:32 +08:00
},
2025-01-21 17:46:32 +08:00
"target":"Popup",
"options":{
"url":"{{entire_url('user_menu.ui')}}"
}
2025-01-03 16:24:32 +08:00
}
2025-01-21 17:46:32 +08:00
],
2025-01-03 16:24:32 +08:00
"subwidgets":[
{
"widgettype":"Icon",
"options":{
"url":"{{entire_url('/imgs/people.png')}}",
"rate":1.5
}
},
{
"widgettype":"Text",
"options":{
"wrap":false,
2025-01-21 13:49:26 +08:00
"text":"{{get_username()}}({{str(get_user_roles(get_user()))}})"
2025-01-03 16:24:32 +08:00
}
}
]
}
{% else %}
{
"widgettype":"IconBar",
"options":{
"css":"filler",
"tools":[
{
"name":"login",
"tip":"user login",
"icon":"{{entire_url('/imgs/login.png')}}"
},
{
"name":"register",
"tip":"user register",
"icon":"{{entire_url('/imgs/register.png')}}"
}
]
},
"binds":[
{
"wid":"self",
"event":"login",
"actiontype":"urlwidget",
"target":"self",
"options":{
"url":"{{entire_url('login.ui')}}"
}
},
{
"wid":"self",
"event":"register",
"actiontype":"urlwidget",
"target":"self",
"options":{
"url":"{{entire_url('register.ui')}}"
}
}
]
}
{% endif %}