ui: fix problem_send result display

This commit is contained in:
undefined committed 2021-05-09 00:13:31 +08:00
1 parent ee693cf36e
commit 41c0b0c608
3 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@hydrooj/ui-default", "name": "@hydrooj/ui-default",
"version": "4.8.4", "version": "4.8.5",
"author": "undefined <i@undefined.moe>", "author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "hydro.js", "main": "hydro.js",
@@ -1,6 +1,7 @@
import yaml from 'js-yaml'; import yaml from 'js-yaml';
import { NamedPage } from 'vj/misc/Page'; import { NamedPage } from 'vj/misc/Page';
import Navigation from 'vj/components/navigation'; import Navigation from 'vj/components/navigation';
import Notification from 'vj/components/notification/index';
import { ActionDialog } from 'vj/components/dialog'; import { ActionDialog } from 'vj/components/dialog';
import loadReactRedux from 'vj/utils/loadReactRedux'; import loadReactRedux from 'vj/utils/loadReactRedux';
import delay from 'vj/utils/delay'; import delay from 'vj/utils/delay';
@@ -244,7 +245,7 @@ const page = new NamedPage(['problem_detail', 'contest_detail_problem', 'homewor
$(ev.currentTarget).hide(); $(ev.currentTarget).hide();
$('[name="problem-sidebar__categories"]').show(); $('[name="problem-sidebar__categories"]').show();
}); });
$('[name="problem-sidebar__send-to"]').click(() => handleClickCopyProblem()); $('[name="problem-sidebar__send-to"]').on('click', handleClickCopyProblem);
loadSubjective(); loadSubjective();
}); });
+1 -1
View File
@@ -48,7 +48,7 @@ export default async function readYamlCases(cfg: Record<string, any> = {}, check
id: config.count, id: config.count,
}); });
} }
} else if (cfg.subtasks) { } else if (cfg.subtasks?.length) {
for (const subtask of cfg.subtasks) { for (const subtask of cfg.subtasks) {
const cases = []; const cases = [];
for (const c of subtask.cases || []) { for (const c of subtask.cases || []) {