feat(downloader): support first_last_piece

This commit is contained in:
InfinityPacer
2024-10-01 18:35:57 +08:00
parent cf3a204eac
commit 9856419292
+11 -2
View File
@@ -97,7 +97,7 @@ function saveDownloaderInfo() {
return return
} }
// 重名判断 // 重名判断
if (props.downloaders.some(item => item.name === downloaderName.value && item!== props.downloader)) { if (props.downloaders.some(item => item.name === downloaderName.value && item !== props.downloader)) {
$toast.error(`${downloaderName.value}】已存在,请替换为其他名称`) $toast.error(`${downloaderName.value}】已存在,请替换为其他名称`)
return return
} }
@@ -175,7 +175,7 @@ onUnmounted(() => {
</div> </div>
</VCardText> </VCardText>
</VCard> </VCard>
<VDialog v-model="downloaderInfoDialog" scrollable max-width="40rem" persistent > <VDialog v-model="downloaderInfoDialog" scrollable max-width="40rem" persistent>
<VCard :title="`${props.downloader.name} - 配置`" class="rounded-t"> <VCard :title="`${props.downloader.name} - 配置`" class="rounded-t">
<DialogCloseBtn v-model="downloaderInfoDialog" /> <DialogCloseBtn v-model="downloaderInfoDialog" />
<VDivider /> <VDivider />
@@ -257,6 +257,15 @@ onUnmounted(() => {
active active
/> />
</VCol> </VCol>
<VCol cols="12" md="6">
<VSwitch
v-model="downloaderInfo.config.first_last_piece"
label="优先首尾文件"
hint="优先下载首尾文件块"
persistent-hint
active
/>
</VCol>
</VRow> </VRow>
<VRow v-if="downloaderInfo.type == 'transmission'"> <VRow v-if="downloaderInfo.type == 'transmission'">
<VCol cols="12" md="6"> <VCol cols="12" md="6">