ui: 捕获zipDownloader错误

This commit is contained in:
undefined committed 2021-06-15 00:02:20 +08:00
1 parent 308605f884
commit 425496f42d
2 files changed
+4 -2

No files matched your search

@@ -86,7 +86,9 @@ export async function downloadProblemSet(pids, name = 'Export') {
let { links } = await request.post( let { links } = await request.post(
`/d/${UiContext.domainId}/p/${pid}/files`, `/d/${UiContext.domainId}/p/${pid}/files`,
{ operation: 'get_links', files: (pdoc.data || []).map((i) => i.name), type: 'testdata' } { 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)) { for (const filename of Object.keys(links)) {
targets.push({ filename: `${pid}/testdata/${filename}`, url: links[filename] }); targets.push({ filename: `${pid}/testdata/${filename}`, url: links[filename] });
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@hydrooj/ui-default", "name": "@hydrooj/ui-default",
"version": "4.11.21", "version": "4.11.22",
"author": "undefined <i@undefined.moe>", "author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "hydro.js", "main": "hydro.js",