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",
"version": "2.30.7",
"version": "2.30.8",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+3 -1
View File
@@ -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 -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')) }}"