mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
Merge branch 'master' into remove-union
This commit is contained in:
3 files changed
+4
-3
No files matched your search
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user