ui: add self rank in ranking page (#368)

This commit is contained in:
panda authored and GitHub committed 2022-05-30 11:32:06 +08:00
1 parent add66f26cf
commit 1fa5eef2e0
2 files changed
+16 -2

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.37.12",
"version": "4.37.13",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -102,7 +102,7 @@
"through2": "^4.0.2",
"timeago-react": "^3.0.4",
"timeago.js": "^4.0.2",
"vditor": "^3.8.14",
"vditor": "^3.8.15",
"vinyl-buffer": "^1.0.1",
"web-streams-polyfill": "^3.2.1",
"webpack": "^4.46.0",
@@ -38,6 +38,20 @@
</tr>
</thead>
<tbody>
{% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) %}
<tr>
<td class="col--rank">{{ handler.user.rank|default('-') }}</td>
<td class="col--user">{{ user.render_inline(handler.user) }}</td>
<td class="col--rp">{{ handler.user.rp|default(0)|round(0) }}</td>
{% for key, def in model.rp %}
{% if not def.hidden %}
<td class="col--detail rp-{{ key }}">{{ handler.user.rpInfo[key]|round if (handler.user.rpInfo|default({}))[key] else '-' }}</td>
{% endif %}
{% endfor %}
<td class="col--ac">{{ handler.user.nAccept|default(0) }}</td>
<td class="col--bio">{{ handler.user.bio|default('')|truncate(64, true)|markdownInline|safe }}</td>
</tr>
{% endif %}
{%- for udoc in udocs -%}
<tr>
<td class="col--rank">{{ (page - 1) * 100 + loop.index }}</td>