From e78b8897fc4a85531fa1e2f24a08281d30644773 Mon Sep 17 00:00:00 2001 From: Nixevol Date: Sun, 25 Oct 2026 09:44:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=BB=E5=8A=A1=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=87=8D=E5=A4=8D=E7=9A=84=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/download/DownloadManagerView.vue | 28 +++++++++++-------- desktop/src/styles.css | 27 +++++++++++++++++- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/desktop/src/features/download/DownloadManagerView.vue b/desktop/src/features/download/DownloadManagerView.vue index 1715b74..639cf33 100644 --- a/desktop/src/features/download/DownloadManagerView.vue +++ b/desktop/src/features/download/DownloadManagerView.vue @@ -95,9 +95,20 @@ function noteText(job: DownloadJob) { text = "保存编号进度时文件被拒绝访问,已下载的内容还在,点继续即可"; } if (!text || text === statusLabel(job)) return ""; + if (text === "正在读取并下载" || text === "准备中") return ""; + if (/^已完成 \d+(,已读取 \d+)?(,失败 \d+)?$/.test(text)) return ""; + if (/^已完成 \d+\/\d+,失败 \d+$/.test(text)) return ""; return text; } +function cardFacts(job: DownloadJob) { + if (waitingToRead(job)) return [job.id, "等待读取编号", `已写入 ${job.writtenRows} 行`]; + const progress = scanning(job) + ? [`已下载 ${job.completed}`, `已读取 ${job.discovered || 0} 个栅格`] + : [`${job.completed}/${job.total} 个栅格`]; + return [job.id, ...progress, `已写入 ${job.writtenRows} 行`]; +} + function waitingToRead(job: DownloadJob) { return Boolean(job.wholeCity) && job.status === "queued"; } @@ -183,15 +194,6 @@ async function changeConcurrency(job: DownloadJob, value: number | null) { } } -function countText(job: DownloadJob) { - const written = `已写入 ${job.writtenRows} 行`; - if (waitingToRead(job)) return `${job.id} · 等待读取 · ${written}`; - const progress = scanning(job) - ? `已完成 ${job.completed} · 已读取 ${job.discovered || 0} 个栅格` - : `${job.completed}/${job.total} 个栅格`; - return `${job.id} · ${progress} · ${written}`; -} - async function saveLimit(value: number | null) { if (!value) return; try { @@ -481,7 +483,9 @@ async function removeJob(job: DownloadJob, files: boolean) {

{{ job.name }}

-
{{ countText(job) }}
+
+ {{ fact }} +
@@ -519,9 +523,9 @@ async function removeJob(job: DownloadJob, files: boolean) { {{ statusLabel(job) }} - {{ noteText(job) }} + {{ noteText(job) }} - 失败 {{ job.failed }} · {{ formatSize(job.fileBytes) }} + 失败 {{ job.failed }} · {{ formatSize(job.fileBytes) }}