Merge branch 'master' into remove-union

This commit is contained in:
undefined committed 2024-10-21 22:42:59 +08:00
commit 517df8d407
3 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ class FpsProblemImportHandler extends Handler {
// `filename` attribute introduced by winterant/OnlineJudge
// PLEASE, respect the spec
const filename = node.$?.filename || `${id}.${ext}`;
const c = node._ || node;
const c = node._ || (typeof node === 'string' ? node : '');
tasks.push(ProblemModel.addTestdata(domainId, pid, filename, Buffer.from(c)));
};
if (p.test_output) {
@@ -366,7 +366,7 @@ const page = new NamedPage('problem_files', () => {
}
}
if (UiContext.pdoc) {
if (UiContext.pdoc && $('[name="generate_testdata"]').length) {
FileSelectAutoComplete.getOrConstruct($('[name=gen]'), { data: UiContext.pdoc.data });
FileSelectAutoComplete.getOrConstruct($('[name=std]'), { data: UiContext.pdoc.data });
$('[name="generate_testdata"]').on('click', handleGenerateTestdata);
@@ -106,13 +106,14 @@
{% endif %}
{% if ui.getNodes('UserDropdown').length %}
<li class="menu__seperator"></li>
{%- for item in ui.getNodes('UserDropdown') -%}
{%- for item in ui.getNodes('UserDropdown') -%} {% if item.checker(handler) %}
<li class="menu__item nojs--hide">
{% set args = (item.args(handler) if typeof(item.args)=='function' else item.args) or {} %}
<a href="{{ url(item.name, args) }}" class="menu__link">
<span class="icon icon-{{ args.icon }}"></span> {{ _(args.displayName or item.name) }}
</a>
</li>
{% endif %}
{%- endfor -%}
{% endif %}
<li class="menu__seperator"></li>