fix migrate callback

pull/1021/head
yann300 4 years ago
parent e532dcccae
commit af2aefd311
  1. 26
      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`<span>'Do you want to download your files to local device first?'</span>`,
{
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`<img class=${css.logoImg} src="assets/img/guitarRemiCroped.webp" onclick="${() => playRemi()}"></img>`

Loading…
Cancel
Save