diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index afc79438c..8374309c5 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -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", diff --git a/packages/hydrooj/src/lib/testdataConfig.ts b/packages/hydrooj/src/lib/testdataConfig.ts index d0f49f41a..1ca1ed86f 100644 --- a/packages/hydrooj/src/lib/testdataConfig.ts +++ b/packages/hydrooj/src/lib/testdataConfig.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; } diff --git a/packages/ui-default/locales/en.yaml b/packages/ui-default/locales/en.yaml index 80d50d12a..babb14e35 100644 --- a/packages/ui-default/locales/en.yaml +++ b/packages/ui-default/locales/en.yaml @@ -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' diff --git a/packages/ui-default/locales/zh.yaml b/packages/ui-default/locales/zh.yaml index 7cfe172b5..08e1195c7 100644 --- a/packages/ui-default/locales/zh.yaml +++ b/packages/ui-default/locales/zh.yaml @@ -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: 客观题 diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index be1bfb187..07ea1c1c6 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.13.9", + "version": "4.13.10", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js", diff --git a/packages/ui-default/templates/problem_detail.html b/packages/ui-default/templates/problem_detail.html index 25c7e0c40..78d999927 100644 --- a/packages/ui-default/templates/problem_detail.html +++ b/packages/ui-default/templates/problem_detail.html @@ -40,7 +40,7 @@