fix: 编号进度改为单线程写入并在任务上显示原因

This commit is contained in:
2026-10-25 08:57:34 +08:00
parent e99a112965
commit 2aa8990b63
5 changed files with 211 additions and 63 deletions
@@ -90,7 +90,10 @@ function statusLabel(job: DownloadJob) {
}
function noteText(job: DownloadJob) {
const text = job.message.trim();
let text = job.message.trim();
if (text === "下载失败,详情见日志") {
text = "保存编号进度时文件被拒绝访问,已下载的内容还在,点继续即可";
}
if (!text || text === statusLabel(job)) return "";
return text;
}
@@ -553,9 +556,12 @@ async function removeJob(job: DownloadJob, files: boolean) {
:processing="job.status === 'running'"
/>
<div class="task-foot">
<n-tag size="small" :type="job.status === 'running' ? 'info' : job.status === 'done' ? 'success' : job.status === 'paused' ? 'warning' : 'default'">
{{ statusLabel(job) }}
</n-tag>
<span class="foot-status">
<n-tag size="small" :type="job.status === 'running' ? 'info' : job.status === 'done' ? 'success' : job.status === 'paused' ? 'warning' : 'default'">
{{ statusLabel(job) }}
</n-tag>
<span v-if="noteText(job)" class="sub">{{ noteText(job) }}</span>
</span>
<span class="sub">失败 {{ job.failed }} · {{ formatSize(job.fileBytes) }}</span>
</div>
<ul v-if="job.failures?.length" class="fail-list">
+13
View File
@@ -472,6 +472,19 @@ select {
gap: 12px;
}
.foot-status {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.foot-status .sub {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.task h3 {
margin: 0;
font-size: 15px;