This commit is contained in:
jxxghp
2023-07-13 07:25:04 +08:00
parent 27ff1bdab9
commit 67b5cdafb8
+24 -70
View File
@@ -156,12 +156,7 @@ const dropdownItems = ref([
<VIcon icon="mdi-dots-vertical" color="white" /> <VIcon icon="mdi-dots-vertical" color="white" />
<VMenu activator="parent" close-on-content-click> <VMenu activator="parent" close-on-content-click>
<VList> <VList>
<VListItem <VListItem v-for="(item, i) in dropdownItems" variant="plain" :key="i" @click="item.props.click">
v-for="(item, i) in dropdownItems"
variant="plain"
:key="i"
@click="item.props.click"
>
<template #prepend> <template #prepend>
<VIcon :icon="item.props.prependIcon"></VIcon> <VIcon :icon="item.props.prependIcon"></VIcon>
</template> </template>
@@ -178,71 +173,29 @@ const dropdownItems = ref([
</VCardText> </VCardText>
<VCardText>{{ torrent?.description }}</VCardText> <VCardText>{{ torrent?.description }}</VCardText>
<VCardItem class="pb-3 pt-0 pe-12" v-if="torrent?.labels"> <VCardItem class="pb-3 pt-0 pe-12" v-if="torrent?.labels">
<VChip <VChip variant="elevated" size="small" v-for="label in torrent?.labels" color="primary" class="me-1 mb-1">{{ label
variant="elevated" }}</VChip>
size="small" <VChip v-if="meta?.edition" variant="elevated" size="small" class="me-1 mb-1 text-white bg-red-500">
v-for="label in torrent?.labels" {{ meta?.edition }}</VChip>
color="primary" <VChip v-if="meta?.resource_pix" variant="elevated" size="small" class="me-1 mb-1 text-white bg-red-500">
class="me-1 mb-1"
>{{ label }}</VChip
>
<VChip
v-if="meta?.edition"
variant="elevated"
size="small"
class="me-1 mb-1 text-white bg-red-500"
>
{{ meta?.edition }}</VChip
>
<VChip
v-if="meta?.resource_pix"
variant="elevated"
size="small"
class="me-1 mb-1 text-white bg-red-500"
>
{{ meta?.resource_pix }} {{ meta?.resource_pix }}
</VChip> </VChip>
<VChip <VChip v-if="meta?.video_encode" variant="elevated" size="small" class="me-1 mb-1 text-white bg-orange-500">
v-if="meta?.video_encode"
variant="elevated"
size="small"
class="me-1 mb-1 text-white bg-orange-500"
>
{{ meta?.video_encode }} {{ meta?.video_encode }}
</VChip> </VChip>
<VChip <VChip v-if="torrent?.size" variant="elevated" size="small" class="me-1 mb-1 text-white bg-yellow-500">
v-if="torrent?.size"
variant="elevated"
size="small"
class="me-1 mb-1 text-white bg-yellow-500"
>
{{ formatFileSize(torrent?.size) }} {{ formatFileSize(torrent?.size) }}
</VChip> </VChip>
<VChip <VChip v-if="meta?.resource_team" variant="elevated" size="small" class="me-1 mb-1 text-white bg-cyan-500">
v-if="meta?.resource_team"
variant="elevated"
size="small"
class="me-1 mb-1 text-white bg-cyan-500"
>
{{ meta?.resource_team }} {{ meta?.resource_team }}
</VChip> </VChip>
<VChip <VChip v-if="torrent?.downloadvolumefactor !== 1 || torrent?.uploadvolumefactor !== 1" :class="getVolumeFactorColor(torrent?.downloadvolumefactor, torrent?.uploadvolumefactor)
v-if="torrent?.downloadvolumefactor !== 1 || torrent?.uploadvolumefactor !== 1" " variant="elevated" size="small" class="me-1 mb-1">
:class="
getVolumeFactorColor(torrent?.downloadvolumefactor, torrent?.uploadvolumefactor)
"
variant="elevated"
size="small"
class="me-1 mb-1"
>
{{ torrent?.volume_factor }} {{ torrent?.volume_factor }}
</VChip> </VChip>
</VCardItem> </VCardItem>
<VCardActions> <VCardActions>
<VBtn <VBtn @click.stop="showMoreTorrents = !showMoreTorrents" v-if="props.more && props.more.length > 0">
@click.stop="showMoreTorrents = !showMoreTorrents"
v-if="props.more && props.more.length > 0"
>
<template #append> <template #append>
<VIcon :icon="showMoreTorrents ? 'mdi-chevron-up' : 'mdi-chevron-down'"></VIcon> <VIcon :icon="showMoreTorrents ? 'mdi-chevron-up' : 'mdi-chevron-down'"></VIcon>
</template> </template>
@@ -253,17 +206,18 @@ const dropdownItems = ref([
<div v-show="showMoreTorrents"> <div v-show="showMoreTorrents">
<VDivider></VDivider> <VDivider></VDivider>
<VChipGroup class="p-3"> <VChipGroup class="p-3">
<VChip <VChip v-for="item in props.more" @click.stop="
v-for="item in props.more" handleAddDownload(
@click.stop=" item.torrent_info?.site_name,
handleAddDownload( item.media_info,
item.torrent_info?.site_name, item.torrent_info
item.media_info, )
item.torrent_info ">
) <template #append>
" <VBadge color="primary" :content="item.torrent_info?.seeders" inline size="small"></VBadge>
>{{ item.torrent_info.site_name }}</VChip </template>
> {{ item.torrent_info.site_name }}
</VChip>
</VChipGroup> </VChipGroup>
</div> </div>
</VExpandTransition> </VExpandTransition>