From d13b67dfad486f3ee7ce14da95db97e5718586c6 Mon Sep 17 00:00:00 2001 From: panda Date: Mon, 21 Oct 2024 00:43:39 +0800 Subject: [PATCH 1/4] fps-import: fix testdata import (#892) --- packages/fps-importer/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fps-importer/index.ts b/packages/fps-importer/index.ts index 4a2386600..85a93924b 100644 --- a/packages/fps-importer/index.ts +++ b/packages/fps-importer/index.ts @@ -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) { From 8409f7395bb47cc194faa0b8a66545c1427d7407 Mon Sep 17 00:00:00 2001 From: Godtokoo <79078025+Godtokoo666@users.noreply.github.com> Date: Mon, 21 Oct 2024 00:49:50 +0800 Subject: [PATCH 2/4] ui: fix UserDropdown permPrivChecker (#891) --- packages/ui-default/templates/partials/nav.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ui-default/templates/partials/nav.html b/packages/ui-default/templates/partials/nav.html index cd241d190..c71be3926 100644 --- a/packages/ui-default/templates/partials/nav.html +++ b/packages/ui-default/templates/partials/nav.html @@ -106,13 +106,14 @@ {% endif %} {% if ui.getNodes('UserDropdown').length %} - {%- for item in ui.getNodes('UserDropdown') -%} + {%- for item in ui.getNodes('UserDropdown') -%} {% if item.checker(handler) %} + {% endif %} {%- endfor -%} {% endif %} From 1cd6c46f37a2fb69f894132906706ce2503237ba Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 18 Oct 2024 06:16:12 +0800 Subject: [PATCH 3/4] ui: fix --- packages/ui-default/templates/problem_detail.html | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ui-default/templates/problem_detail.html b/packages/ui-default/templates/problem_detail.html index 9d87852aa..7335a5a47 100644 --- a/packages/ui-default/templates/problem_detail.html +++ b/packages/ui-default/templates/problem_detail.html @@ -38,6 +38,7 @@ {% if handler.user.hasPriv(PRIV.PRIV_USER_PROFILE) and not tdoc %}
+