From 1165939f95b940bcb9a3e4605506c646c2f3ab4a Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Wed, 15 Mar 2023 13:05:18 +0530 Subject: [PATCH] workspace name --- libs/remix-ui/workspace/src/lib/actions/index.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 37abd6592b..424daf41d9 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -383,16 +383,10 @@ export const handleDownloadWorkspace = async () => { await workspaceProvider.copyFolderToJson('/', ({ path, content }) => { zip.file(path, content) }) - zip.generateAsync({ type: 'blob' }).then(function (blob) { - const today = new Date() - const date = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate() - const time = today.getHours() + 'h' + today.getMinutes() + 'min' - - saveAs(blob, `remix-backup-at-${time}-${date}.zip`) - }).catch((e) => { - plugin.call('notification', 'toast', e.message) - }) + const blob = await zip.generateAsync({ type: 'blob' }) + saveAs(blob, `${workspaceProvider.workspace}.zip`) } catch (e) { + console.error(e) plugin.call('notification', 'toast', e.message) } }