From 425496f42d40102582e9eabeea9ec7c9afc126ea Mon Sep 17 00:00:00 2001 From: undefined Date: Tue, 15 Jun 2021 00:02:20 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E6=8D=95=E8=8E=B7zipDownloader=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui-default/components/zipDownloader/index.js | 4 +++- packages/ui-default/package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ui-default/components/zipDownloader/index.js b/packages/ui-default/components/zipDownloader/index.js index 885ea406c..004eb502d 100644 --- a/packages/ui-default/components/zipDownloader/index.js +++ b/packages/ui-default/components/zipDownloader/index.js @@ -86,7 +86,9 @@ export async function downloadProblemSet(pids, name = 'Export') { let { links } = await request.post( `/d/${UiContext.domainId}/p/${pid}/files`, { operation: 'get_links', files: (pdoc.data || []).map((i) => i.name), type: 'testdata' } - ); + ).catch((e) => { + Notification.warn(`${e.error.message} ${e.error.params[0]}`); + }); for (const filename of Object.keys(links)) { targets.push({ filename: `${pid}/testdata/${filename}`, url: links[filename] }); } diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index 64f8403cf..7c5331aad 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/ui-default", - "version": "4.11.21", + "version": "4.11.22", "author": "undefined ", "license": "AGPL-3.0", "main": "hydro.js",