Skip to content

Commit

Permalink
Merge pull request #28 from Arzte/loading
Browse files Browse the repository at this point in the history
Make it clear when a Download is finished
  • Loading branch information
ltouroumov committed Aug 28, 2024
2 parents 5b779a8 + 197bbd3 commit 99c3474
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/viewer/ProjectMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ const loadRemoteFile = async ({ target }: MouseEvent) => {
});
}
progress.value = `Loading ${target.text}...`;
// A hack, but otherwise the progress value never updates before loadProject is called
const pause = new Promise((resolve) => setTimeout(resolve, 100));
await pause;
const bodyBytes = new Uint8Array(received);
let pos = 0;
for (const chunk of chunks) {
Expand Down

0 comments on commit 99c3474

Please sign in to comment.