ui: fix contest_files ui (#385)

This commit is contained in:
panda authored and GitHub committed 2022-07-10 14:54:05 +08:00
1 parent 2a54b0aa25
commit b8a4ed4c52
7 files changed
+27 -9

No files matched your search

+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.14.7",
"version": "3.14.8",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
@@ -68,7 +68,6 @@
"@types/mongodb": "^3.6.20",
"@types/nodemailer": "^6.4.4",
"@types/notp": "^2.0.2",
"@types/path-to-regexp": "^1.7.0",
"@types/semver": "^7.3.10",
"@types/serialize-javascript": "^5.0.2",
"@types/source-map-support": "^0.5.4",
+5
View File
@@ -108,6 +108,11 @@ export class ContestDetailHandler extends Handler {
tdoc, tsdoc, udict, page,
};
if (contest.isNotStarted(tdoc)) return;
if (!this.request.json) {
this.response.body.tdoc.content = this.response.body.tdoc.content
.replace(/\(file:\/\//g, `(./${tdoc.docId}/file/`)
.replace(/="file:\/\//g, `="./${tdoc.docId}/file/`);
}
const pdict = await problem.getList(domainId, tdoc.pids, true, undefined, undefined, problem.PROJECTION_CONTEST_LIST);
const psdict = {};
let rdict = {};