Skip to content

Commit

Permalink
Give some more feedback on the model download UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas101 committed Nov 29, 2024
1 parent a3ae34a commit ca51f66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/extension/ui-model-install-popup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="details">
<div id="model"></div>
<div id="progress">
<div id="progress-bar"></div>
<div id="progress-bar" style="width: 1%"></div>
</div>
<div id="progress-status"></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/extension/ui-model-install-popup/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit ca51f66

Please sign in to comment.