Browse Source

Fix Waiting is displayed as Compiling

pull/6/head
Menci 6 years ago
parent
commit
724985fa2e
  1. 4
      views/status_label.ejs
  2. 3
      views/submissions_item.ejs

4
views/status_label.ejs

@ -39,8 +39,8 @@ Vue.component('status-label', {
<script type="text/x-template" id="statusIconTemplate">
<span class="status" :class="colorClass">
<i class="icon" :class="icon"></i>
<template v-if="['Running', 'Waiting'].includes(status) && progress">
<span style="display: inline-block; width: 58px; ">{{ status }}</span>{{ progress.finished }}/{{ progress.total }}
<template v-if="['Running', 'Waiting'].includes(status) && progress && progress.total">
<span style="text-align: left; display: inline-block; width: 58px; ">{{ status }}</span>{{ progress.finished }}/{{ progress.total }}
</template>
<template v-else>
{{ status }}

3
views/submissions_item.ejs

@ -23,13 +23,12 @@ Vue.component('submission-item', {
props: ['data', 'config', 'showRejudge', 'progress', 'compiling'],
computed: {
statusString() {
if (this.compiling) return 'Compiling';
const data = this.data;
if (data.result) {
return data.result.result;
} else if (data.running) {
if (this.compiling) return 'Compiling';
return 'Running';
} else return 'Waiting';
},

Loading…
Cancel
Save