ui: fix contest_submit

This commit is contained in:
undefined committed 2021-05-23 21:48:04 +08:00
1 parent aed95cc7e6
commit a02c859d04
3 files changed
+7 -7

No files matched your search

+5 -5
View File
@@ -270,6 +270,11 @@ class ContestProblemHandler extends Handler {
attended: this.attended,
page_name: 'contest_detail_problem',
};
try {
this.response.body.pdoc.config = await parseConfig(this.pdoc.config);
} catch (e) {
this.response.body.pdoc.config = `Cannot parse: ${e.message}`;
}
}
// eslint-disable-next-line
@@ -284,11 +289,6 @@ class ContestProblemHandler extends Handler {
// e.g. ![img](a.jpg) will navigate to ![img](./pid/file/a.jpg)
this.response.body.pdoc.content = this.response.body.pdoc.content
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`);
try {
this.response.body.pdoc.config = await parseConfig(this.pdoc.config);
} catch (e) {
this.response.body.pdoc.config = `Cannot parse: ${e.message}`;
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.8.43",
"version": "4.8.44",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@@ -7,7 +7,7 @@ function setOptions($el, options) {
});
}
const page = new NamedPage(['problem_submit', 'contest_detail_problem_submit'], async () => {
const page = new NamedPage(['problem_submit', 'contest_detail_problem_submit', 'homework_detail_problem_submit'], async () => {
$(document).on('click', '[name="problem-sidebar__show-category"]', (ev) => {
$(ev.currentTarget).hide();
$('[name="problem-sidebar__categories"]').show();