This commit is contained in:
jxxghp
2024-09-30 11:11:01 +08:00
parent d22ef17b95
commit dc3e364b90
4 changed files with 17 additions and 12 deletions
+3 -2
View File
@@ -213,8 +213,9 @@ onMounted(() => {
<AddDownloadDialog <AddDownloadDialog
v-if="addDownloadDialog" v-if="addDownloadDialog"
v-model="addDownloadDialog" v-model="addDownloadDialog"
:media="props.torrent?.media_info" :title="`${media?.title_year || meta?.name} ${meta?.season_episode}`"
:torrent="props.torrent?.torrent_info" :media="media"
:torrent="torrent"
@done="addDownloadSuccess" @done="addDownloadSuccess"
@error="addDownloadError" @error="addDownloadError"
@close="addDownloadDialog = false" @close="addDownloadDialog = false"
+6 -2
View File
@@ -16,6 +16,9 @@ const showMoreTorrents = ref(false)
// 种子信息 // 种子信息
const torrent = ref(props.torrent?.torrent_info) const torrent = ref(props.torrent?.torrent_info)
// 媒体信息
const media = ref(props.torrent?.media_info)
// 识别元数据 // 识别元数据
const meta = ref(props.torrent?.meta_info) const meta = ref(props.torrent?.meta_info)
@@ -171,8 +174,9 @@ onMounted(() => {
<AddDownloadDialog <AddDownloadDialog
v-if="addDownloadDialog" v-if="addDownloadDialog"
v-model="addDownloadDialog" v-model="addDownloadDialog"
:media="props.torrent?.media_info" :title="`${media?.title_year || meta?.name} ${meta?.season_episode}`"
:torrent="props.torrent?.torrent_info" :media="media"
:torrent="torrent"
@done="addDownloadSuccess" @done="addDownloadSuccess"
@error="addDownloadError" @error="addDownloadError"
@close="addDownloadDialog = false" @close="addDownloadDialog = false"
+7 -7
View File
@@ -4,9 +4,11 @@ import api from '@/api'
import { doneNProgress, startNProgress } from '@/api/nprogress' import { doneNProgress, startNProgress } from '@/api/nprogress'
import type { DownloaderConf, MediaInfo, TorrentInfo, TransferDirectoryConf } from '@/api/types' import type { DownloaderConf, MediaInfo, TorrentInfo, TransferDirectoryConf } from '@/api/types'
import { formatFileSize } from '@/@core/utils/formatters' import { formatFileSize } from '@/@core/utils/formatters'
import { VCardTitle } from 'vuetify/lib/components/index.mjs'
// 输入参数 // 输入参数
const props = defineProps({ const props = defineProps({
title: String,
media: Object as PropType<MediaInfo>, media: Object as PropType<MediaInfo>,
torrent: Object as PropType<TorrentInfo>, torrent: Object as PropType<TorrentInfo>,
}) })
@@ -113,24 +115,23 @@ onMounted(() => {
</script> </script>
<template> <template>
<VDialog max-width="40rem" scrollable> <VDialog max-width="40rem" scrollable>
<VCard title="确认下载"> <VCard>
<VCardTitle v-if="title">下载 - {{ title }}</VCardTitle>
<VCardTitle v-else>确认下载</VCardTitle>
<DialogCloseBtn @click="emit('close')" /> <DialogCloseBtn @click="emit('close')" />
<VDivider /> <VDivider />
<VCardText> <VCardText>
<VRow> <VRow>
<VCol cols="12" class="text-lg text-high-emphasis"> <VCol cols="12" class="text-lg text-high-emphasis pb-0">
<strong>标题</strong>{{ props.torrent?.title }}<br /> <strong>标题</strong>{{ props.torrent?.title }}<br />
<strong>站点</strong>{{ props.torrent?.site_name }}<br /> <strong>站点</strong>{{ props.torrent?.site_name }}<br />
<strong>大小</strong>{{ formatFileSize(props.torrent?.size || 0) }} <strong>大小</strong>{{ formatFileSize(props.torrent?.size || 0) }}
</VCol> </VCol>
</VRow>
<VRow>
<VCol cols="12" md="4"> <VCol cols="12" md="4">
<VSelect <VSelect
v-model="selectedDownloader" v-model="selectedDownloader"
:items="downloaderOptions" :items="downloaderOptions"
label="下载器" label="下载器"
density="compact"
variant="underlined" variant="underlined"
placeholder="默认" placeholder="默认"
/> />
@@ -141,13 +142,12 @@ onMounted(() => {
:items="targetDirectories" :items="targetDirectories"
label="保存目录" label="保存目录"
placeholder="自动" placeholder="自动"
density="compact"
variant="underlined" variant="underlined"
/> />
</VCol> </VCol>
</VRow> </VRow>
</VCardText> </VCardText>
<VCardText class="text-center mt-3"> <VCardText class="text-center">
<VBtn <VBtn
variant="elevated" variant="elevated"
:disabled="loading" :disabled="loading"
+1 -1
View File
@@ -26,7 +26,7 @@ const resourceItemsPerPage = ref(25)
// 加载状态 // 加载状态
const resourceLoading = ref(false) const resourceLoading = ref(false)
// 识别元数据 // 种子元数据
const torrent = ref<TorrentInfo>() const torrent = ref<TorrentInfo>()
// 资源浏览表头 // 资源浏览表头