mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: 优化ACM计分板显示
This commit is contained in:
1 parent
09db5a9108
commit
e5b1304bd9
7 files changed
+15
-11
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.8.22",
|
||||
"version": "4.8.23",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -6,7 +6,6 @@ import substitute from 'vj/utils/substitute';
|
||||
import Notification from 'vj/components/notification';
|
||||
import i18n from 'vj/utils/i18n';
|
||||
import base64 from 'vj/utils/base64';
|
||||
import request from 'vj/utils/request';
|
||||
|
||||
const page = new NamedPage('user_detail', async () => {
|
||||
$('[name="profile_contact_copy"]').get().forEach((el) => {
|
||||
@@ -20,8 +19,7 @@ const page = new NamedPage('user_detail', async () => {
|
||||
Notification.error(substitute(i18n('Copy "{data}" failed :('), { data: decoded }));
|
||||
});
|
||||
});
|
||||
const data = await request.get('');
|
||||
const history = data.udoc?.ratingHistory || [];
|
||||
const history = UiContext.udoc?.ratingHistory || [];
|
||||
while (history.length > 30) history.shift();
|
||||
while (history.length < 30) history.unshift(1500);
|
||||
const $dom = document.getElementById('rating-placeholder');
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
{{ user.render_inline(udict[column.raw], badge=false) }}
|
||||
{% elif column.type == 'record' and column.raw %}
|
||||
<a href="{{ url('record_detail', rid=column.raw) }}">
|
||||
<span style="font-weight:bold;color:{{ utils.status.getScoreColor(column.value) }}">{{ column.value }}</span>
|
||||
<span style="font-weight:bold;color:{{ utils.status.getScoreColor(column.value) }}">{{ column.value|safe }}</span>
|
||||
</a>
|
||||
{% else %}
|
||||
{{ column.value }}
|
||||
|
||||
@@ -74,6 +74,11 @@
|
||||
<li class="footer__extra-link-item">{{ html|safe }}</li>
|
||||
{%- endfor -%}
|
||||
<li class="footer__extra-link-item">Powered by <a href="https://hydro.js.org">Hydro v{{ global.Hydro.version.hydrooj }}</a></li>
|
||||
{% if model.system.get('server.pro') %}
|
||||
<li class="footer__extra-link-item">Professional Version</li>
|
||||
{% else %}
|
||||
<li class="footer__extra-link-item">Community Version (for non-commercial use only)</li>
|
||||
{% endif %}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% import "components/home.html" as home with context %}
|
||||
{% extends "layout/basic.html" %}
|
||||
{% block content %}
|
||||
{{ set(UiContext, 'udoc', udoc) }}
|
||||
<style>
|
||||
.user-profile-bg {
|
||||
background-image : url("{{ udoc.backgroundImage }}");
|
||||
|
||||
Reference in new issue
Block a user