From 155dd21c31cfdaa0b7e99c6844b123133583e541 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 24 Mar 2021 11:28:49 +0100 Subject: [PATCH] fix migrate callback --- .../src/app/ui/landing-page/landing-page.js | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/apps/remix-ide/src/app/ui/landing-page/landing-page.js b/apps/remix-ide/src/app/ui/landing-page/landing-page.js index 2a9bd341a3..6acf7d65da 100644 --- a/apps/remix-ide/src/app/ui/landing-page/landing-page.js +++ b/apps/remix-ide/src/app/ui/landing-page/landing-page.js @@ -400,26 +400,34 @@ export class LandingPage extends ViewPlugin { document.location.reload() } + const migrate = async () => { + tooltip('migrating workspace...') + try { + const workspaceName = await migrateToWorkspace(this.fileManager, this.filePanel) + tooltip('done. ' + workspaceName + ' created.') + } catch (e) { + return tooltip(e.message) + } + } + const migrateWorkspace = async () => { modalDialog( 'File system Migration', yo`'Do you want to download your files to local device first?'`, { label: 'Download und Migrate', - fn: async () => { await downloadFiles() } + fn: async () => { + await downloadFiles() + migrate() + } }, { label: 'Migrate', - fn: () => {} + fn: () => { + migrate() + } } ) - tooltip('migrating workspace...') - try { - const workspaceName = await migrateToWorkspace(this.fileManager, this.filePanel) - tooltip('done. ' + workspaceName + ' created.') - } catch (e) { - return tooltip(e.message) - } } const img = yo``