fix torrent ui

This commit is contained in:
jxxghp
2023-09-23 11:55:49 +08:00
parent cfa75b7643
commit 0ff24f4b09
2 changed files with 14 additions and 25 deletions

View File

@@ -647,6 +647,7 @@ onMounted(() => {
<VListItemTitle>查看详情</VListItemTitle>
</VListItem>
<VListItem
v-if="item.raw.enclosure?.startsWith('http')"
variant="plain"
@click="downloadTorrentFile(item.raw.enclosure)"
>

View File

@@ -122,26 +122,6 @@ function getVolumeFactorClass(downloadVolume: number, uploadVolume: number) {
onMounted(() => {
getSiteIcon()
})
// 弹出菜单
const dropdownItems = ref([
{
title: '查看详情',
value: 1,
props: {
prependIcon: 'mdi-information',
click: openTorrentDetail,
},
},
{
title: '下载种子',
value: 2,
props: {
prependIcon: 'mdi-download',
click: downloadTorrentFile,
},
},
])
</script>
<template>
@@ -180,15 +160,23 @@ const dropdownItems = ref([
>
<VList>
<VListItem
v-for="(item, i) in dropdownItems"
:key="i"
variant="plain"
@click="item.props.click"
@click="openTorrentDetail()"
>
<template #prepend>
<VIcon :icon="item.props.prependIcon" />
<VIcon icon="mdi-information" />
</template>
<VListItemTitle v-text="item.title" />
<VListItemTitle>查看详情</VListItemTitle>
</VListItem>
<VListItem
v-if="props.torrent?.torrent_info?.enclosure?.startsWith('http')"
variant="plain"
@click="downloadTorrentFile()"
>
<template #prepend>
<VIcon icon="mdi-download" />
</template>
<VListItemTitle>下载种子</VListItemTitle>
</VListItem>
</VList>
</VMenu>