add switch

This commit is contained in:
2024-02-21 12:04:41 +08:00
parent 76d1838768
commit aa7fbd47a0
65 changed files with 2220 additions and 806 deletions

View File

@@ -6,7 +6,24 @@ import { VIDEO_COLLECT_API_URL } from '@/data/constants'
import { Clock24Regular, Person24Regular, Question24Regular } from '@vicons/fluent'
import { useElementSize } from '@vueuse/core'
import { List } from 'linqts'
import { NAlert, NButton, NCard, NDivider, NEllipsis, NIcon, NImage, NLayoutContent, NList, NListItem, NProgress, NResult, NSpace, NText, NTooltip, useMessage } from 'naive-ui'
import {
NAlert,
NButton,
NCard,
NDivider,
NEllipsis,
NIcon,
NImage,
NLayoutContent,
NList,
NListItem,
NProgress,
NResult,
NSpace,
NText,
NTooltip,
useMessage,
} from 'naive-ui'
import { computed, ref } from 'vue'
import { useRoute } from 'vue-router'
@@ -121,10 +138,22 @@ function formatSecondsToTime(seconds: number): string {
<NListItem v-for="item in acceptVideos" v-bind:key="item.info.bvid">
<NCard size="small" :hoverable="!item.video.watched" :embedded="!item.video.watched">
<NSpace>
<NImage :src="item.video.cover + '@100h'" lazy :img-props="{ referrerpolicy: 'no-referrer' }" height="75" @click="onClick(item.video)" preview-disabled style="cursor: pointer" />
<NImage
:src="item.video.cover + '@100h'"
lazy
:img-props="{ referrerpolicy: 'no-referrer' }"
height="75"
@click="onClick(item.video)"
preview-disabled
style="cursor: pointer"
/>
<NSpace vertical :size="5">
<NButton style="width: 100%; max-width: 100px" @click="onClick(item.video)" text>
<NText :title="item.video.title" :delete="item.video.watched" :style="`color: ${item.video.watched ? '#a54e4e' : ''};width: ${width - 20}px;`">
<NText
:title="item.video.title"
:delete="item.video.watched"
:style="`color: ${item.video.watched ? '#a54e4e' : ''};width: ${width - 20}px;`"
>
{{ item.video.title }}
</NText>
</NButton>