Skip to content

Commit

Permalink
style(editor): loading in import .bw
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Dec 3, 2021
1 parent 8d9d2c2 commit 3d7fefc
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/use/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,21 @@ export const useProject = () => {
}

const onExportProject = () => {
storage.normalize().then(() => {
saveAs(
new Blob([JSON.stringify(storage.getProjectObject())], {
type: 'application/json',
}),
PROJECT.nameRaw + '.bw'
)
})
isLoading.value = true

storage
.normalize()
.then(() => {
saveAs(
new Blob([JSON.stringify(storage.getProjectObject())], {
type: 'application/json',
}),
PROJECT.nameRaw + '.bw'
)
})
.finally(() => {
isLoading.value = false
})
}

const onImportProject = () => {
Expand Down

0 comments on commit 3d7fefc

Please sign in to comment.