Browse Source

Merge branch 'master' of zhaojunzhe/fair-web into master

pull/31/head
richie 5 years ago committed by Gogs
parent
commit
088de5576c
  1. 2
      libs/judger.js
  2. 2
      views/submission.ejs
  3. 4
      views/submission_contest.ejs
  4. 9
      views/user_edit.ejs

2
libs/judger.js

@ -208,7 +208,7 @@ async function connect() {
judge_state.result = convertedResult.result;
await judge_state.save();
await judge_state.updateRelatedInfo(false);
} else if (result.type == interface.ProgressReportType.Compiled) {
} else if (result.type === interface.ProgressReportType.Compiled) {
if (!judge_state) return;
judge_state.compilation = result.progress;
await judge_state.save();

2
views/submission.ejs

@ -352,7 +352,7 @@ if (token != null) {
socket.emit('join', token, function (data) {
console.log("join! ", data);
if (data && data.ok) {
if (data.finished && data.result && data.result.judge) {
if (data.finished && data.result && data.result.judge && data.result.judge.subtasks) {
let max=0;
data.result.judge.subtasks.forEach(function (item) {
item.cases.forEach(function (one) {

4
views/submission_contest.ejs

@ -337,7 +337,7 @@ if (token != null) {
socket.on('finish', function (p) {
console.log("Judge finished");
let max=0;
if (p && p.result && p.result.judge) {
if (p && p.result && p.result.judge && p.result.judge.subtasks) {
p.result.judge.subtasks.forEach(function (item) {
item.cases.forEach(function (one) {
max = one.result.time
@ -353,7 +353,7 @@ if (token != null) {
socket.emit('join', token, function (data) {
console.log("join! ", data);
if (data && data.ok) {
if (data.finished && data.result && data.result.judge) {
if (data.finished && data.result && data.result.judge && data.result.judge.subtasks) {
let max=0;
data.result.judge.subtasks.forEach(function (item) {
item.cases.forEach(function (one) {

9
views/user_edit.ejs

@ -21,6 +21,10 @@
<% if (!user.allowedManage) { %> readonly
<% } %>
>
</div>
<div class="field">
<label for="nickname">昵称</label>
<input type="text" id="nickname" name="nickname" value="<%= edited_user.nickname %>">
</div>
<div class="field">
<label for="username">匿名名称</label>
@ -72,11 +76,6 @@
<input type="hidden" name="information">
<div class="ui form">
<div class="field">
<label class="ui header">昵称</label>
<input type="text" placeholder="昵称" name="nickname" value="<%= edited_user.nickname %>" id="nickname">
</div>
<div class="field">
<label class="ui header">密码</label>
<input type="password" placeholder="原密码(留空则不修改)" name="old_password" id="old_password">

Loading…
Cancel
Save