poe-svelte-ui-lib 1.32.1 → 1.32.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
: []),
|
|
76
76
|
])
|
|
77
77
|
|
|
78
|
+
/* Прогресс закачки 0..100; нечисло (NaN, массив в формате ProgressBar и т.п.) — 0, а не «NaN%» */
|
|
79
|
+
let progress = $derived(Number.isFinite(Number(uploadProgress)) ? Math.min(100, Math.max(0, Number(uploadProgress))) : 0)
|
|
80
|
+
|
|
78
81
|
let pendingDelete: string | null = $state(null)
|
|
79
82
|
const confirmDelete = () => {
|
|
80
83
|
if (pendingDelete) onDelete?.(pendingDelete)
|
|
@@ -153,12 +156,9 @@
|
|
|
153
156
|
{#if uploading}
|
|
154
157
|
<div class="flex items-center gap-2 text-[12px]" transition:slide={{ duration: 100 }}>
|
|
155
158
|
<div class="h-2 flex-1 overflow-hidden rounded-full bg-(--container-color)">
|
|
156
|
-
<div
|
|
157
|
-
class="h-full rounded-full bg-(--accent-color) transition-[width] duration-300"
|
|
158
|
-
style="width: {Math.min(100, Math.max(0, uploadProgress))}%"
|
|
159
|
-
></div>
|
|
159
|
+
<div class="h-full rounded-full bg-(--accent-color) transition-[width] duration-300" style="width: {progress}%"></div>
|
|
160
160
|
</div>
|
|
161
|
-
<span class="w-10 text-right tabular-nums">{Math.round(
|
|
161
|
+
<span class="w-10 text-right tabular-nums">{Math.round(progress)}%</span>
|
|
162
162
|
</div>
|
|
163
163
|
{/if}
|
|
164
164
|
{#if uploadError}
|