feat: enhance download manager with folder notes and improved worker settings

This commit is contained in:
Nixevol
2026-09-27 15:30:48 +08:00
parent fdb1f73968
commit 68d27a5caf
5 changed files with 184 additions and 35 deletions
+9 -1
View File
@@ -84,6 +84,10 @@ function toggleSection(section: Section, checked: boolean) {
selected.value = next;
}
function clearSelection() {
selected.value = new Set();
}
function pruneSelection() {
const ids = new Set(sections.value.flatMap((section) => section.items.map((item) => item.id)));
selected.value = new Set([...selected.value].filter((id) => ids.has(id)));
@@ -417,7 +421,10 @@ async function startDownload() {
</div>
</div>
<footer class="download-foot">
<n-text>已选 {{ selected.size }} 部</n-text>
<div class="foot-selected">
<n-text>已选 {{ selected.size }} 部</n-text>
<n-button secondary size="small" :disabled="selected.size === 0" @click="clearSelection">取消选择</n-button>
</div>
<div class="foot-actions">
<n-text class="foot-dir" depth="3" :title="directory">{{ directory || "未设置下载目录" }}</n-text>
<n-button secondary size="small" @click="chooseDirectory">选择</n-button>
@@ -445,6 +452,7 @@ async function startDownload() {
background: #18181c;
}
.foot-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.foot-selected { display: flex; align-items: center; gap: 8px; flex: none; }
.foot-dir { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-error { display: block; padding: 0 20px 8px; text-align: right; }
.catalog-error { margin: 8px 20px 12px; }