ui: add superuser badge at user_detail

This commit is contained in:
undefined committed 2021-08-01 15:54:22 +08:00
1 parent 739534f9f7
commit 26a381ce3f
4 files changed
+13 -4

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.14.6",
"version": "4.14.7",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -63,7 +63,14 @@
{{ model.builtin.USER_GENDER_ICONS[udoc.gender] }}
</span>
{% endif %}
{% if udoc.hasPerm(perm.PERM_MOD_BADGE) %}
{% if udoc.hasPriv(PRIV.PRIV_MOD_BADGE) %}
<span
class="profile-header__contact-item user-profile-badge badge--su"
data-tooltip="{{ _('{0} is a superuser.').format(_('She' if udoc.gender == 1 else 'He')) }}"
>
SU
</span>
{% else if udoc.hasPerm(perm.PERM_MOD_BADGE) %}
<span
class="profile-header__contact-item user-profile-badge badge--mod"
data-tooltip="{{ _('{0} is a moderator of this domain.').format(_('She' if udoc.gender == 1 else 'He')) }}"