mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: 支持自定义导出文件名
This commit is contained in:
1 parent
cdbbee8180
commit
0273bfe198
13 files changed
+50
-32
No files matched your search
@@ -10,7 +10,7 @@ import { ProblemAdd } from 'hydrooj/dist/lib/ui';
|
||||
import problem from 'hydrooj/dist/model/problem';
|
||||
import { PERM } from 'hydrooj/dist/model/builtin';
|
||||
import { buildContent } from 'hydrooj/dist/lib/content';
|
||||
import type { ContentNode, ProblemConfig } from 'hydrooj';
|
||||
import type { ContentNode, ProblemConfigFile } from 'hydrooj';
|
||||
|
||||
fs.ensureDirSync('/tmp/hydro/import-qduoj');
|
||||
|
||||
@@ -78,7 +78,7 @@ class ImportQduojHandler extends Handler {
|
||||
const n = await problem.get(domainId, pdoc.display_id);
|
||||
if (n) pdoc.display_id = null;
|
||||
const pid = await problem.add(domainId, pdoc.display_id, pdoc.title, buildContent(content, 'html'), this.user._id, pdoc.tags);
|
||||
const config: ProblemConfig = {
|
||||
const config: ProblemConfigFile = {
|
||||
time: `${pdoc.time_limit}ms`,
|
||||
memory: `${pdoc.memory_limit}m`,
|
||||
subtasks: [],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/import-qduoj",
|
||||
"version": "1.1.9",
|
||||
"version": "1.2.0",
|
||||
"description": "Import QDUOJ problem export",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
|
||||
Reference in new issue
Block a user