mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix contest_submit
This commit is contained in:
1 parent
aed95cc7e6
commit
a02c859d04
3 files changed
+7
-7
No files matched your search
@@ -270,6 +270,11 @@ class ContestProblemHandler extends Handler {
|
|||||||
attended: this.attended,
|
attended: this.attended,
|
||||||
page_name: 'contest_detail_problem',
|
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
|
// eslint-disable-next-line
|
||||||
@@ -284,11 +289,6 @@ class ContestProblemHandler extends Handler {
|
|||||||
// e.g.  will navigate to 
|
// e.g.  will navigate to 
|
||||||
this.response.body.pdoc.content = this.response.body.pdoc.content
|
this.response.body.pdoc.content = this.response.body.pdoc.content
|
||||||
.replace(/\(file:\/\//g, `(./${this.pdoc.docId}/file/`);
|
.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,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.8.43",
|
"version": "4.8.44",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"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) => {
|
$(document).on('click', '[name="problem-sidebar__show-category"]', (ev) => {
|
||||||
$(ev.currentTarget).hide();
|
$(ev.currentTarget).hide();
|
||||||
$('[name="problem-sidebar__categories"]').show();
|
$('[name="problem-sidebar__categories"]').show();
|
||||||
|
|||||||
Reference in new issue
Block a user