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
+4 -4
View File
@@ -170,7 +170,7 @@ const settings = ref({
adbMode: "device" as "device" | "settings",
custom: { ...builtinDevice.value },
proxy: emptyProxy(),
workers: 2,
workers: 6,
directory: "",
defaultDirectory: "",
});
@@ -241,7 +241,7 @@ async function loadDeviceDefaults() {
function normalizeWorkers(value: unknown) {
const count = Number(value);
if (!Number.isInteger(count) || count < 1 || count > 8) return 2;
if (!Number.isInteger(count) || count < 1) return 6;
return count;
}
@@ -302,7 +302,7 @@ async function saveSettings() {
const workers = normalizeWorkers(draft.value.workers);
if (workers !== Number(draft.value.workers)) {
settingsTab.value = "download";
settingsError.value = "同时下载数量需要在 1 到 8 之间";
settingsError.value = "同时下载数量至少为 1";
return;
}
const directory = draft.value.directory.trim();
@@ -365,7 +365,7 @@ function restoreCurrent() {
draft.value.proxy = emptyProxy();
return;
}
draft.value.workers = 2;
draft.value.workers = 6;
draft.value.directory = draft.value.defaultDirectory || settings.value.defaultDirectory;
}