mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: hide nAccept in contest
This commit is contained in:
1 parent
b35d75cfe8
commit
719cc0570c
5 files changed
+10
-5
No files matched your search
@@ -37,8 +37,9 @@ async function postInit() {
|
||||
if (!global.Hydro.isFirstWorker) return;
|
||||
const judge = require('./judge');
|
||||
|
||||
const { task, system, setting } = global.Hydro.model;
|
||||
const { storage } = global.Hydro.service;
|
||||
const {
|
||||
task, system, setting, storage,
|
||||
} = global.Hydro.model;
|
||||
const _judge = global.Hydro.handler.judge as any;
|
||||
|
||||
if (system.get('hydrojudge.disable')) return;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.29.21",
|
||||
"version": "2.29.22",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "dist/loader.js",
|
||||
"typings": "dist/loader.d.ts",
|
||||
|
||||
@@ -270,10 +270,13 @@ export class ContestProblemHandler extends Handler {
|
||||
// @ts-ignore
|
||||
if (this.pdoc.domainId !== domainId) this.pdoc.docId = `${this.pdoc.domainId}:${this.pdoc.docId}`;
|
||||
this.attended = this.tsdoc && this.tsdoc.attend === 1;
|
||||
const showAccept = contest.canShowScoreboard.call(this, this.tdoc, true);
|
||||
if (!showAccept) this.pdoc.nAccept = 0;
|
||||
if (contest.isNotStarted(this.tdoc)) throw new ContestNotLiveError(tid);
|
||||
if (!contest.isDone(this.tdoc) && !this.attended) throw new ContestNotAttendedError(tid);
|
||||
this.response.template = 'problem_detail.html';
|
||||
this.response.body = {
|
||||
showAccept,
|
||||
tdoc: this.tdoc,
|
||||
tsdoc: this.tsdoc,
|
||||
pdoc: this.pdoc,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.12.15",
|
||||
"version": "4.12.16",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -39,13 +39,14 @@
|
||||
</div>
|
||||
<div class="section__body">
|
||||
<ul class="problem__tags">
|
||||
<span class="bp3-tag bp3-large bp3-minimal problem__tag-item">{{ _('ID') }}: {{ pdoc.docId }}</span>
|
||||
<span class="bp3-tag bp3-large bp3-minimal problem__tag-item">{{ _('Type') }}: {{ pdoc.config.type }}</span>
|
||||
{% if pdoc.config.type != 'subjective' and pdoc.config.type != 'submit_answer' %}
|
||||
<span class="bp3-tag bp3-large bp3-minimal problem__tag-item">{{ _('Time') }}: {{ pdoc.config.timeMax if pdoc.config.timeMax == pdoc.config.timeMin else pdoc.config.timeMin+'~'+pdoc.config.timeMax }}ms</span>
|
||||
<span class="bp3-tag bp3-large bp3-minimal problem__tag-item">{{ _('Memory') }}: {{ pdoc.config.memoryMax if pdoc.config.memoryMax == pdoc.config.memoryMin else pdoc.config.memoryMin+'~'+pdoc.config.memoryMax }}MiB</span>
|
||||
{% endif %}
|
||||
<a class="bp3-tag bp3-large bp3-minimal bp3-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId}) }}">{{ _('Tried') }}: {{ pdoc.nSubmit }}</a>
|
||||
<a class="bp3-tag bp3-large bp3-minimal bp3-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId, status:1}) }}">{{ _('Accepted') }}: {{ pdoc.nAccept }}</a>
|
||||
<a class="bp3-tag bp3-large bp3-minimal bp3-interactive problem__tag-item" href="{{ url('record_main', query={pid:pdoc.docId, status:1}) }}">{{ _('Accepted') }}: {{ pdoc.nAccept if ((not tdoc) or showAccept) else '?' }}</a>
|
||||
<span class="bp3-tag bp3-large bp3-minimal problem__tag-item">{{ _('Difficulty') }}: {{ pdoc['difficulty'] or _('(None)') }}</span>
|
||||
<span class="bp3-tag bp3-large bp3-minimal bp3-interactive problem__tag-item">{{ _('Uploaded By') }}: {{ user.render_inline(udoc, badge=false) }}</span>
|
||||
{% if pdoc.tag.length %}
|
||||
|
||||
Reference in new issue
Block a user