From 197bbd3ea89b4a05a7fd4f24a4c46c38f80f5242 Mon Sep 17 00:00:00 2001 From: Iris Hoffmeyer Date: Sat, 17 Aug 2024 22:09:04 -0400 Subject: [PATCH] Make it clear when a Download is finished QOL change, Intellectually I know the download finishes quickly and we're just waiting on project load, but emotionally this download takes forever :p --- components/viewer/ProjectMenu.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/viewer/ProjectMenu.vue b/components/viewer/ProjectMenu.vue index a2edc68..b91d380 100644 --- a/components/viewer/ProjectMenu.vue +++ b/components/viewer/ProjectMenu.vue @@ -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) {