rbac/www/user/user.ui

76 lines
1.1 KiB
Plaintext
Raw Normal View History

2025-01-03 16:24:32 +08:00
{% if get_user() %}
{
"widgettype":"HBox",
"options":{
"css":"clickable",
"popup":{
"options":{
"auto_dismiss":true
},
"popup_desc":{
"widgettype":"urlwidget",
"options":{
"url":"{{entire_url('user_menu.ui')}}"
}
},
"popup_event":"click"
}
},
"subwidgets":[
{
"widgettype":"Icon",
"options":{
"url":"{{entire_url('/imgs/people.png')}}",
"rate":1.5
}
},
{
"widgettype":"Text",
"options":{
"wrap":false,
"text":"{{get_username()}}"
}
}
]
}
{% 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 %}