From 728ced475bbc956f1a4cc87dd44e05ef5998f5eb Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 8 Jul 2026 17:19:47 +0800 Subject: [PATCH] feat: add computed dialog subtitle for download confirmation --- src/components/dialog/AddDownloadDialog.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/dialog/AddDownloadDialog.vue b/src/components/dialog/AddDownloadDialog.vue index 344e24e0..d224dca2 100644 --- a/src/components/dialog/AddDownloadDialog.vue +++ b/src/components/dialog/AddDownloadDialog.vue @@ -68,6 +68,14 @@ const buttonText = computed(() => loading.value ? t('dialog.addDownload.downloading') : t('dialog.addDownload.startDownload'), ) +// 下载确认副标题,未传媒体标题时回退到种子标题。 +const dialogSubtitle = computed(() => { + const siteName = props.torrent?.site_name?.trim() + const displayTitle = props.title?.trim() || props.torrent?.title?.trim() + + return [siteName, displayTitle].filter(Boolean).join(' - ') +}) + // 加载目录设置 async function loadDirectories() { try { @@ -78,6 +86,7 @@ async function loadDirectories() { } } +// 将下载目录配置转换为下载器可识别的存储路径。 function convertToUri(item: TransferDirectoryConf) { if (!item.download_path) { return undefined @@ -181,7 +190,7 @@ onMounted(() => { {{ t('dialog.addDownload.confirmDownload') }} - {{ torrent?.site_name }} - {{ title }} + {{ dialogSubtitle }}