Minor changes to toaster

pull/1026/head
ioedeveloper 4 years ago committed by Liana Husikyan
parent 516f4cfb9c
commit 998cb3bb30
  1. 8
      apps/remix-ide/src/app/ui/landing-page/landing-page.js
  2. 1
      apps/remix-ide/src/migrateFileSystem.js

@ -322,7 +322,6 @@ export class LandingPage extends ViewPlugin {
const downloadFiles = async () => {
try {
tooltip('preparing files, please wait..')
const fileProviders = globalRegistry.get('fileproviders').api
const zip = new JSZip()
await fileProviders.browser.copyFolderToJson('/', ({ path, content }) => {
@ -331,6 +330,7 @@ export class LandingPage extends ViewPlugin {
zip.folder(path, content)
})
zip.generateAsync({ type: 'blob' }).then(function (blob) {
tooltip('Files ready for download. Do not disconnect from the internet.')
saveAs(blob, 'remixdbackup.zip')
}).catch((e) => {
tooltip(e.message)
@ -402,12 +402,14 @@ export class LandingPage extends ViewPlugin {
}
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)
setTimeout(() => {
tooltip(e.message)
}, 1000)
}
}

@ -25,7 +25,6 @@ export async function migrateToWorkspace (fileManager, filePanel) {
const browserProvider = fileManager.getProvider('browser')
const workspaceProvider = fileManager.getProvider('workspace')
const files = await browserProvider.copyFolderToJson('/')
console.log(files)
if (Object.keys(files).length === 0) {
// we don't have any root file, only .workspaces

Loading…
Cancel
Save