ui: 为使用文件IO的题目添加标记

This commit is contained in:
undefined committed 2021-07-26 13:58:46 +08:00
1 parent a340902203
commit 336cff75f2
6 files changed
+9 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "2.29.43",
"version": "2.29.44",
"bin": "bin/hydrooj.js",
"main": "dist/loader.js",
"typings": "dist/loader.d.ts",
@@ -36,6 +36,10 @@ export async function parseConfig(config: string | ProblemConfigFile = {}) {
result.timeMax = result.timeMin = 1000;
}
if (cfg.langs) result.langs = cfg.langs;
if (cfg.filename && result.type === 'default') {
result.type = 'fileio';
result.subType = cfg.filename;
}
return result;
}
+1
View File
@@ -25,6 +25,7 @@ problem_solution: Problem Solution
problem_statistics: Problem Statistics
problem_submit: Problem Submit
problem_type.default: 'Type: Default'
problem_type.fileio: 'Type: FileIO ({0})'
problem_type.interactive: 'Type: Interactive'
problem_type.remote_judge: 'Type: RemoteJudge'
problem_type.subjective: 'Type: Subjective'
+1
View File
@@ -555,6 +555,7 @@ problem_solution: 题解
problem_statistics: 题目统计
problem_submit: 递交代码
problem_type.default: 传统题
problem_type.fileio: '文件IO ({0})'
problem_type.interactive: 交互题
problem_type.remote_judge: 远端评测题
problem_type.subjective: 客观题
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.13.9",
"version": "4.13.10",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -40,7 +40,7 @@
<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 bp3-icon-standard bp3-icon-book">{{ _('problem_type.' + pdoc.config.type) }}</span>
<span class="bp3-tag bp3-large bp3-minimal problem__tag-item bp3-icon-standard bp3-icon-book">{{ _('problem_type.' + pdoc.config.type).format(pdoc.config.subType) }}</span>
{% if pdoc.config.type != 'subjective' and pdoc.config.type != 'submit_answer' %}
<span class="bp3-tag bp3-large bp3-minimal problem__tag-item bp3-icon-standard bp3-icon-stopwatch">{{ 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 bp3-icon-standard bp3-icon-comparison">{{ pdoc.config.memoryMax if pdoc.config.memoryMax == pdoc.config.memoryMin else pdoc.config.memoryMin+'~'+pdoc.config.memoryMax }}MiB</span>