mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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",
|
||||
"version": "2.26.7",
|
||||
"version": "2.26.8",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -116,14 +116,14 @@ const acm: ContestRule = {
|
||||
let colTimeStr;
|
||||
if (doc.accept) {
|
||||
rid = doc.rid;
|
||||
colAccepted = _('Accepted');
|
||||
colAccepted = `${_('Accepted')} ${doc.naccept ? ` (-${doc.naccept})` : ''}`;
|
||||
colTime = doc.time;
|
||||
colTimeStr = misc.formatSeconds(colTime) + (doc.naccept ? ` (-${doc.naccept})` : '');
|
||||
colTimeStr = misc.formatSeconds(colTime);
|
||||
} else {
|
||||
rid = null;
|
||||
colAccepted = '-';
|
||||
colAccepted = doc.naccept ? `(-${doc.naccept})` : '-';
|
||||
colTime = '-';
|
||||
colTimeStr = doc.naccept ? `(-${doc.naccept})` : '-';
|
||||
colTimeStr = '';
|
||||
}
|
||||
if (isExport) {
|
||||
row.push({ type: 'string', value: colAccepted });
|
||||
@@ -132,7 +132,7 @@ const acm: ContestRule = {
|
||||
} else {
|
||||
row.push({
|
||||
type: 'record',
|
||||
value: '{0}\n{1}'.format(colAccepted, colTimeStr),
|
||||
value: '{0}<br>{1}'.format(colAccepted, colTimeStr),
|
||||
raw: rid,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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