mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: fix remote_judge for cors problem
This commit is contained in:
1 parent
21d18780e4
commit
6905b9953e
5 files changed
+54
-24
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/ui-default",
|
||||
"version": "4.18.5",
|
||||
"version": "4.18.6",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "hydro.js",
|
||||
|
||||
@@ -12,12 +12,14 @@ const page = new NamedPage(['problem_submit', 'contest_detail_problem_submit', '
|
||||
$(ev.currentTarget).hide();
|
||||
$('[name="problem-sidebar__categories"]').show();
|
||||
});
|
||||
|
||||
const { domainId } = UiContext.pdocConfig;
|
||||
|
||||
function onChangeMain(update = true) {
|
||||
const options = {};
|
||||
for (const key in window.LANGS) {
|
||||
if (UiContext.pdocConfig.langs && !UiContext.pdocConfig.langs.includes(key)) continue;
|
||||
if (window.LANGS[key].domain && !window.LANGS[key].domain.includes(UiContext.domainId)) continue;
|
||||
if (UiContext.domain.langs && !`,${UiContext.domain.langs},`.includes(`,${key},`)) continue;
|
||||
if (window.LANGS[key].domain && !window.LANGS[key].domain.includes(domainId)) continue;
|
||||
if (key.startsWith(`${this.value}.`) && key !== this.value) options[key] = window.LANGS[key].display;
|
||||
}
|
||||
setOptions($('#codelang-sub-select'), options);
|
||||
@@ -33,8 +35,7 @@ const page = new NamedPage(['problem_submit', 'contest_detail_problem_submit', '
|
||||
const main = {};
|
||||
for (const key in window.LANGS) {
|
||||
if (UiContext.pdocConfig.langs && !UiContext.pdocConfig.langs.filter((i) => i === key || i.startsWith(`${key}.`)).length) continue;
|
||||
if (window.LANGS[key].domain && !window.LANGS[key].domain.includes(UiContext.domainId)) continue;
|
||||
if (UiContext.domain.langs && !`,${UiContext.domain.langs},`.includes(`,${key},`)) continue;
|
||||
if (window.LANGS[key].domain && !window.LANGS[key].domain.includes(domainId)) continue;
|
||||
if (!key.includes('.')) main[key] = window.LANGS[key].display;
|
||||
}
|
||||
setOptions($('#codelang-main-select'), main);
|
||||
|
||||
Reference in new issue
Block a user