Buckets:
gijl/lv-storage / llama.cpp /tools /ui /src /lib /components /app /models /ModelDownloadProgressBar.svelte
| <script lang="ts"> | |
| interface Props { | |
| downloadedBytes: number; | |
| totalBytes: number; | |
| overlay?: boolean; | |
| } | |
| let { downloadedBytes, overlay = false, totalBytes }: Props = $props(); | |
| let fraction = $derived.by(() => { | |
| if (totalBytes <= 0) return 0; | |
| return Math.min(Math.max(downloadedBytes / totalBytes, 0), 1); | |
| }); | |
| let percent = $derived(Math.round(fraction * 100)); | |
| </script> | |
| {#if overlay} | |
| <div class="pointer-events-none absolute inset-x-0 bottom-0 h-0.5 overflow-hidden rounded-b-sm"> | |
| <div | |
| class="h-full animate-pulse bg-primary transition-[width] duration-200 ease-out" | |
| style="width: {percent}%" | |
| ></div> | |
| </div> | |
| {:else} | |
| <div class="h-1 w-full overflow-hidden rounded-full bg-muted"> | |
| <div | |
| class="h-full animate-pulse bg-primary transition-[width] duration-200 ease-out" | |
| style="width: {percent}%" | |
| ></div> | |
| </div> | |
| {/if} | |
Xet Storage Details
- Size:
- 856 Bytes
- Xet hash:
- 7a760a85279c563aef26e1de80ece1e68c8672a958d8e9819156e8313d1cdc97
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.