From ca51f66c3317ef9d1244f428fd7a327d2c4026a5 Mon Sep 17 00:00:00 2001 From: Thomas Beverley Date: Fri, 29 Nov 2024 11:47:19 +0000 Subject: [PATCH] Give some more feedback on the model download UI --- src/extension/ui-model-install-popup/index.html | 2 +- src/extension/ui-model-install-popup/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension/ui-model-install-popup/index.html b/src/extension/ui-model-install-popup/index.html index ebf27de..21b4a4c 100644 --- a/src/extension/ui-model-install-popup/index.html +++ b/src/extension/ui-model-install-popup/index.html @@ -9,7 +9,7 @@
-
+
diff --git a/src/extension/ui-model-install-popup/index.ts b/src/extension/ui-model-install-popup/index.ts index 8644d66..2527fc0 100644 --- a/src/extension/ui-model-install-popup/index.ts +++ b/src/extension/ui-model-install-popup/index.ts @@ -26,8 +26,8 @@ async function render (progress: { inflight: boolean, progress: number | null, n } document.getElementById('model').textContent = progress.name - document.getElementById('progress-status').textContent = progress.progress === null ? 'Loading...' : `${progress.progress}%` - document.getElementById('progress-bar').style.width = progress.progress === null ? '0%' : `${progress.progress}%` + document.getElementById('progress-status').textContent = progress.progress === null ? 'Loading...' : `${Math.max(1, progress.progress)}%` + document.getElementById('progress-bar').style.width = progress.progress === null ? '1%' : `${Math.max(1, progress.progress)}%` } main()