fix(ui): stabilize live progress counters

This commit is contained in:
Diego Fabricio authored and GitHub committed 2026-08-15 14:41:54 +08:00
1 parent 356127f0e3
commit 6a2000deff
9 files changed
+14 -14

No files matched your search

@@ -692,7 +692,7 @@ watch(
<div v-if="running && previews.length > 1 && currentFileIndex >= 0" class="flex items-center gap-1.5 text-xs text-muted-foreground">
<FileCode class="w-3.5 h-3.5 shrink-0" />
<span class="truncate">{{ t("sqlFile.fileProgress", { current: currentFileIndex + 1, total: previews.length }) }} — {{ currentFileName }}</span>
<span class="truncate tabular-nums">{{ t("sqlFile.fileProgress", { current: currentFileIndex + 1, total: previews.length }) }} — {{ currentFileName }}</span>
</div>
<template v-if="!running && previews.length > 1 && perFileResults.length > 0">
@@ -741,23 +741,23 @@ watch(
<div class="grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs">
<div class="border rounded-md px-2 py-1.5 min-w-0">
<div class="text-muted-foreground truncate">{{ t("sqlFile.statement") }}</div>
<div class="font-medium truncate">{{ progress?.statementIndex ?? 0 }}</div>
<div class="font-medium truncate tabular-nums">{{ progress?.statementIndex ?? 0 }}</div>
</div>
<div class="border rounded-md px-2 py-1.5 min-w-0">
<div class="text-muted-foreground truncate">{{ t("sqlFile.succeeded") }}</div>
<div class="font-medium text-green-600 truncate">
<div class="font-medium text-green-600 truncate tabular-nums">
{{ progress?.successCount ?? 0 }}
</div>
</div>
<div class="border rounded-md px-2 py-1.5 min-w-0">
<div class="text-muted-foreground truncate">{{ t("sqlFile.failed") }}</div>
<div class="font-medium text-destructive truncate">
<div class="font-medium text-destructive truncate tabular-nums">
{{ progress?.failureCount ?? 0 }}
</div>
</div>
<div class="border rounded-md px-2 py-1.5 min-w-0">
<div class="text-muted-foreground truncate">{{ t("sqlFile.affectedRows") }}</div>
<div class="font-medium truncate">
<div class="font-medium truncate tabular-nums">
{{ (progress?.affectedRows ?? 0).toLocaleString() }}
</div>
</div>