From fd0dcec61d90ceee6f2b859cbacd0d23058cdcd8 Mon Sep 17 00:00:00 2001 From: Anuraag Jain Date: Sat, 6 Jan 2024 13:15:21 +0200 Subject: [PATCH] fix: progress bar colors for light theme --- src/lib/components/chat/SettingsModal.svelte | 34 ++++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/lib/components/chat/SettingsModal.svelte b/src/lib/components/chat/SettingsModal.svelte index d98a8f39..f2cb4f17 100644 --- a/src/lib/components/chat/SettingsModal.svelte +++ b/src/lib/components/chat/SettingsModal.svelte @@ -277,12 +277,13 @@ } } else { digest = data.digest; + let downloadProgress = 0; if (data.completed) { - pullProgress = Math.round((data.completed / data.total) * 1000) / 10; + downloadProgress = Math.round((data.completed / data.total) * 1000) / 10; } else { - pullProgress = 100; + downloadProgress = 100; } - modelDownloadStatus[opts.modelName] = {pullProgress}; + modelDownloadStatus[opts.modelName] = {pullProgress: downloadProgress, digest: data.digest}; } } } @@ -1277,22 +1278,22 @@ > - + + --> + {#if Object.keys(modelDownloadStatus).length > 0} @@ -1308,12 +1309,17 @@ {#each Object.entries(modelDownloadStatus) as [modelName, payload]} - + +
+ {payload.digest} +
+ {/each}
{modelName}
+
{ payload.pullProgress ?? 0}% -