mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: add superuser badge at user_detail
This commit is contained in:
1 parent
739534f9f7
commit
26a381ce3f
4 files changed
+13
-4
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.30.7",
|
||||
"version": "2.30.8",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -218,7 +218,9 @@ class RecordModel {
|
||||
|
||||
@ArgMethod
|
||||
static getByUid(domainId: string, uid: number, limit: number): Promise<RecordDoc[]> {
|
||||
return RecordModel.coll.find({ domainId, uid, hidden: false }).sort({ _id: -1 }).limit(limit).toArray();
|
||||
return RecordModel.coll.find({
|
||||
domainId, uid, hidden: false, 'contest.tid': null,
|
||||
}).sort({ _id: -1 }).limit(limit).toArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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')) }}"
|
||||
|
||||
Reference in new issue
Block a user