输入文件 @@ -91,12 +82,17 @@
diff --git a/modules/api.js b/modules/api.js index 7ae5bdc..77bca5f 100644 --- a/modules/api.js +++ b/modules/api.js @@ -132,7 +132,7 @@ app.get('/api/waiting_judge', async (req, res) => { judge_id: judge_state.id, code: judge_state.code, language: judge_state.language, - testdata: judge_state.problem.testdata.md5, + testdata: judge_state.problem.testdata ? judge_state.problem.testdata.md5 : '', time_limit: judge_state.problem.time_limit, memory_limit: judge_state.problem.memory_limit, file_io: judge_state.problem.file_io, diff --git a/static/style.css b/static/style.css index 72fd771..99da201 100644 --- a/static/style.css +++ b/static/style.css @@ -47,26 +47,46 @@ th { :not(.status_detail).status.runtime_error, .title:hover .status_detail.status.runtime_error, -.title.active .status_detail.status.runtime_error { +.title.active .status_detail.status.runtime_error, +:not(.status_detail).status.file_error, +.title:hover .status_detail.status.file_error, +.title.active .status_detail.status.file_error { color: darkorchid; } -:not(.status_detail).status.memory_limit_exceed, -.title:hover .status_detail.status.memory_limit_exceed, -.title.active .status_detail.status.memory_limit_exceed, -:not(.status_detail).status.time_limit_exceed, -.title:hover .status_detail.status.time_limit_exceed, -.title.active .status_detail.status.time_limit_exceed, -:not(.status_detail).status.output_limit_exceed, -.title:hover .status_detail.status.output_limit_exceed, -.title.active .status_detail.status.output_limit_exceed { +:not(.status_detail).status.memory_limit_exceeded, +.title:hover .status_detail.status.memory_limit_exceeded, +.title.active .status_detail.status.memory_limit_exceeded, +:not(.status_detail).status.time_limit_exceeded, +.title:hover .status_detail.status.time_limit_exceeded, +.title.active .status_detail.status.time_limit_exceeded, +:not(.status_detail).status.output_limit_exceeded, +.title:hover .status_detail.status.output_limit_exceeded, +.title.active .status_detail.status.output_limit_exceeded { color: sandybrown; } -:not(.status_detail).status.waiting, :not(.status_detail).status.system_error { +:not(.status_detail).status.waiting, +.title:hover .status_detail.status.waiting, +.title.active .status_detail.status.waiting, +:not(.status_detail).status.system_error { color: grey; } +:not(.status_detail).status.running, +.title:hover .status_detail.status.running, +.title.active .status_detail.status.running { + color: #6cf; +} + +:not(.status_detail).status.compiling { + color: #00b5ad; +} + +:not(.status_detail).status.no_testdata { + color: brown; +} + :not(.status_detail).status.compile_error { color: rgb(0, 68, 136); } diff --git a/views/header.ejs b/views/header.ejs index aae1cdf..24f06b2 100644 --- a/views/header.ejs +++ b/views/header.ejs @@ -1,3 +1,25 @@ +<% +this.getStatusMeta = (status) => { + if (status.startsWith('Running')) return 'Running'; + else return status; +} + +this.icon = { + 'Accepted': 'checkmark', + 'Wrong Answer': 'remove', + 'Runtime Error': 'bomb', + 'Time Limit Exceeded': 'clock', + 'Memory Limit Exceeded': 'disk outline', + 'Output Limit Exceeded': 'print', + 'File Error': 'file outline', + 'Waiting': 'hourglass half', + 'Running': 'spinner', + 'Compiling': 'spinner', + 'Compile Error': 'code', + 'System Error': 'server', + 'No Testdata': 'folder open outline' +} +%>
diff --git a/views/judge_detail.ejs b/views/judge_detail.ejs index 7e22727..f26d57d 100644 --- a/views/judge_detail.ejs +++ b/views/judge_detail.ejs @@ -18,21 +18,8 @@输入文件 @@ -91,12 +82,17 @@