diff --git a/desktop/src/features/download/DownloadManagerView.vue b/desktop/src/features/download/DownloadManagerView.vue index e89b74f..6fe436b 100644 --- a/desktop/src/features/download/DownloadManagerView.vue +++ b/desktop/src/features/download/DownloadManagerView.vue @@ -68,10 +68,20 @@ async function refresh() { } function statusLabel(job: DownloadJob) { + if (job.stopping) return "正在停止"; if (job.status === "cancelled" && (job.message === "已取消" || job.message === "已中断")) return job.message; return statusText[job.status] || job.status; } +function waitingToRead(job: DownloadJob) { + return Boolean(job.wholeCity) && job.status === "queued"; +} + +function formatCreatedAt(value?: string | null) { + if (!value) return "—"; + return value.replace("T", " "); +} + function scanning(job: DownloadJob) { return Boolean(job.wholeCity) && job.listingDone === false; } @@ -107,6 +117,7 @@ function closeDetail() { 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} 个栅格`; @@ -205,7 +216,7 @@ async function removeJob(job: DownloadJob, files: boolean) { {{ statusLabel(opened) }}