mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: 在线IDE中显示历史提交
This commit is contained in:
1 parent
5cae54ed0a
commit
5153a7a871
8 files changed
+6
-70
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.11.29",
|
||||
"version": "4.11.30",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
{% if tdoc %}
|
||||
{{ set(UiContext, 'canViewRecord', model.contest.canShowRecord.call(handler, tdoc)) }}
|
||||
{{ set(UiContext, 'postSubmitUrl', url('contest_detail_problem_submit' if tdoc.docType == model.document.TYPE_CONTEST else 'homework_detail_problem_submit', pid=pdoc.pid, tid=tdoc.docId)) }}
|
||||
{{ set(UiContext, 'getSubmissionsUrl', url('contest_detail_problem_submit' if tdoc.docType == model.document.TYPE_CONTEST else 'homework_detail_problem_submit', pid=pdoc.pid, tid=tdoc.docId)) }}
|
||||
{{ set(UiContext, 'getSubmissionsUrl', url('record_main', query={uidOrName:handler.user._id, pid:pdoc.pid, tid:tdoc.docId})) }}
|
||||
{{ set(UiContext, 'getRecordDetailUrl', url('record_detail', rid='{rid}', query={tid:tdoc.docId})) }}
|
||||
{{ set(UiContext, 'pretestConnUrl', "/record-conn?pretest=1&uid=" + handler.user._id + "&pid=" + pdoc.domainId + ":" + pdoc.docId + "&domainId=" + handler.domainId + "&tid=" + tdoc.docId) }}
|
||||
{% else %}
|
||||
{{ set(UiContext, 'canViewRecord', true) }}
|
||||
{{ set(UiContext, 'postSubmitUrl', url('problem_submit', pid=pdoc.docId)) }}
|
||||
{{ set(UiContext, 'getSubmissionsUrl', url('problem_submit', pid=pdoc.docId)) }}
|
||||
{{ set(UiContext, 'getSubmissionsUrl', url('record_main', query={uidOrName:handler.user._id, pid:pdoc.docId})) }}
|
||||
{{ set(UiContext, 'getRecordDetailUrl', url('record_detail', rid='{rid}')) }}
|
||||
{{ set(UiContext, 'pretestConnUrl', "/record-conn?pretest=1&uid=" + handler.user._id + "&pid=" + pdoc.docId + "&domainId=" + handler.domainId) }}
|
||||
{% endif %}
|
||||
|
||||
@@ -3,40 +3,6 @@
|
||||
{{ set(UiContext, 'pdocConfig', pdoc.config) }}
|
||||
<div class="row">
|
||||
<div class="medium-9 columns">
|
||||
{% if not tdoc or rdocs.length %}
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Recent 10 Records') }}</h1>
|
||||
</div>
|
||||
<div class="section__body no-padding">
|
||||
{% if not rdocs.length %}
|
||||
{{ nothing.render('You have not submitted any solutions for this problem') }}
|
||||
{% else %}
|
||||
<table class="data-table">
|
||||
<colgroup>
|
||||
<col class="col--status">
|
||||
<col class="col--memory">
|
||||
<col class="col--time">
|
||||
<col class="col--submit-at">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col--status record-status--border">{{ _('Status') }}</th>
|
||||
<th class="col--memory">{{ _('Peak Memory') }}</th>
|
||||
<th class="col--time">{{ _('Total Time') }}</th>
|
||||
<th class="col--submit-at">{{ _('Submit At') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{%- for rdoc in rdocs -%}
|
||||
{% include 'problem_submit_tr.html' %}
|
||||
{%- endfor -%}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="section">
|
||||
<div class="section__header">
|
||||
<h1 class="section__title">{{ _('Submit to Judge') }}</h1>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
{% import "components/record.html" as record with context %}
|
||||
<tr data-rid="{{ rdoc['_id'] }}">
|
||||
{{ record.render_status_td(rdoc) }}
|
||||
<td class="col--memory">
|
||||
{{ (rdoc.memory / 1000)|round(0, 'ceil')|int }} MB
|
||||
</td>
|
||||
<td class="col--time">
|
||||
{{ rdoc.time|round|int }}ms
|
||||
</td>
|
||||
<td class="col--submit-at">{{ datetimeSpan(rdoc._id)|safe }}</td>
|
||||
</tr>
|
||||
Reference in new issue
Block a user