update vuetify => 3.5.7

This commit is contained in:
jxxghp
2024-04-02 11:37:25 +08:00
parent 1488017bf2
commit fd1ee398c4
9 changed files with 145 additions and 125 deletions
+2 -2
View File
@@ -53,7 +53,7 @@
"vue3-ace-editor": "^2.2.4", "vue3-ace-editor": "^2.2.4",
"vue3-apexcharts": "^1.4.1", "vue3-apexcharts": "^1.4.1",
"vue3-perfect-scrollbar": "^1.6.0", "vue3-perfect-scrollbar": "^1.6.0",
"vuetify": "3.3.5", "vuetify": "3.5.7",
"vuetify-use-dialog": "^0.6.0", "vuetify-use-dialog": "^0.6.0",
"vuex": "^4.1.0", "vuex": "^4.1.0",
"vuex-persistedstate": "^4.1.0", "vuex-persistedstate": "^4.1.0",
@@ -110,4 +110,4 @@
"resolutions": { "resolutions": {
"postcss": "8" "postcss": "8"
} }
} }
+48 -48
View File
@@ -438,6 +438,7 @@ function getYear(airDate: string) {
'transition transform-cpu duration-300 scale-105 shadow-lg': hover.isHovering, 'transition transform-cpu duration-300 scale-105 shadow-lg': hover.isHovering,
'ring-1': isImageLoaded, 'ring-1': isImageLoaded,
}" }"
@click.stop="goMediaDetail"
> >
<VImg <VImg
aspect-ratio="2/3" aspect-ratio="2/3"
@@ -453,55 +454,54 @@ function getYear(airDate: string) {
<VSkeletonLoader class="object-cover aspect-w-2 aspect-h-3" /> <VSkeletonLoader class="object-cover aspect-w-2 aspect-h-3" />
</div> </div>
</template> </template>
<!-- 类型角标 -->
<VChip
v-show="isImageLoaded"
variant="elevated"
size="small"
:class="getChipColor(props.media?.type || '')"
class="absolute left-2 top-2 bg-opacity-80 shadow-md text-white font-bold"
>
{{ props.media?.type }}
</VChip>
<!-- 本地存在标识 -->
<ExistIcon v-if="isExists" />
<!-- 评分角标 -->
<VChip
v-if="isImageLoaded && props.media?.vote_average && !isExists"
variant="elevated"
size="small"
:class="getChipColor('rating')"
class="absolute right-2 top-2 bg-opacity-80 shadow-md text-white font-bold"
>
{{ props.media?.vote_average }}
</VChip>
<!-- 详情 -->
<VCardText
v-show="hover.isHovering || imageLoadError"
class="w-full flex flex-col flex-wrap justify-end align-left text-white absolute bottom-0 cursor-pointer pa-2"
@click.stop="goMediaDetail"
>
<span class="font-bold">{{ props.media?.year }}</span>
<h1 class="mb-1 text-white font-extrabold text-xl line-clamp-2 overflow-hidden text-ellipsis ...">
{{ props.media?.title }}
</h1>
<p class="leading-4 line-clamp-4 overflow-hidden text-ellipsis ...">
{{ props.media?.overview }}
</p>
<div class="flex align-center justify-between">
<IconBtn
icon="mdi-magnify"
color="white"
@click.stop="handleSearch"
/>
<IconBtn
icon="mdi-heart"
:color="isSubscribed ? 'error' : 'white'"
@click.stop="handleSubscribe"
/>
</div>
</VCardText>
</VImg> </VImg>
<!-- 类型角标 -->
<VChip
v-show="isImageLoaded"
variant="elevated"
size="small"
:class="getChipColor(props.media?.type || '')"
class="absolute left-2 top-2 bg-opacity-80 shadow-md text-white font-bold"
>
{{ props.media?.type }}
</VChip>
<!-- 本地存在标识 -->
<ExistIcon v-if="isExists" />
<!-- 评分角标 -->
<VChip
v-if="isImageLoaded && props.media?.vote_average && !isExists"
variant="elevated"
size="small"
:class="getChipColor('rating')"
class="absolute right-2 top-2 bg-opacity-80 shadow-md text-white font-bold"
>
{{ props.media?.vote_average }}
</VChip>
<!-- 详情 -->
<VCardText
v-show="hover.isHovering || imageLoadError"
class="w-full flex flex-col flex-wrap justify-end align-left text-white absolute bottom-0 cursor-pointer pa-2"
>
<span class="font-bold">{{ props.media?.year }}</span>
<h1 class="mb-1 text-white font-extrabold text-xl line-clamp-2 overflow-hidden text-ellipsis ...">
{{ props.media?.title }}
</h1>
<p class="leading-4 line-clamp-4 overflow-hidden text-ellipsis ...">
{{ props.media?.overview }}
</p>
<div class="flex align-center justify-between">
<IconBtn
icon="mdi-magnify"
color="white"
@click.stop="handleSearch"
/>
<IconBtn
icon="mdi-heart"
:color="isSubscribed ? 'error' : 'white'"
@click.stop="handleSubscribe"
/>
</div>
</VCardText>
</VCard> </VCard>
</template> </template>
</VHover> </VHover>
+10 -4
View File
@@ -54,6 +54,16 @@ function setDashboardConfig() {
</script> </script>
<template> <template>
<!-- 底部操作按钮 -->
<VFab
icon="mdi-view-dashboard-edit"
location="bottom end"
size="x-large"
fixed
app
appear
@click="dialog = true"
/>
<VRow class="match-height"> <VRow class="match-height">
<VCol <VCol
v-if="config.storage" v-if="config.storage"
@@ -132,10 +142,6 @@ function setDashboardConfig() {
<MediaServerLatest /> <MediaServerLatest />
</VCol> </VCol>
</VRow> </VRow>
<!-- 底部操作按钮 -->
<span class="fixed right-5 bottom-5">
<VBtn icon="mdi-view-dashboard-edit" class="me-2" color="primary" size="x-large" @click="dialog = true" />
</span>
<!-- 弹窗根据配置生成选项 --> <!-- 弹窗根据配置生成选项 -->
<VDialog <VDialog
v-model="dialog" v-model="dialog"
+20 -16
View File
@@ -127,20 +127,24 @@ onMounted(() => {
/> />
</div> </div>
<!-- 视图切换 --> <!-- 视图切换 -->
<span v-if="dataList.length > 0" class="fixed right-5 bottom-5"> <VFab
<VBtn v-if="viewType === 'list'"
v-if="viewType === 'list'" icon="mdi-view-grid"
size="x-large" location="bottom end"
icon="mdi-view-grid" size="x-large"
color="primary" fixed
@click="setViewType('card')" app
/> appear
<VBtn @click="setViewType('card')"
v-else />
size="x-large" <VFab
icon="mdi-view-list" v-else
color="primary" icon="mdi-view-list"
@click="setViewType('list')" location="bottom end"
/> size="x-large"
</span> fixed
app
appear
@click="setViewType('list')"
/>
</template> </template>
+13 -20
View File
@@ -1,5 +1,4 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useDefer } from '@/@core/utils/dom'
import api from '@/api' import api from '@/api'
import type { Plugin } from '@/api/types' import type { Plugin } from '@/api/types'
import NoDataFound from '@/components/NoDataFound.vue' import NoDataFound from '@/components/NoDataFound.vue'
@@ -24,9 +23,6 @@ const PluginAppDialog = ref(false)
// 插件安装统计 // 插件安装统计
const PluginStatistics = ref<{ [key: string]: number }>({}) const PluginStatistics = ref<{ [key: string]: number }>({})
// 延迟加载
let defer = (_: number) => true
// 关闭插件市场窗口 // 关闭插件市场窗口
function pluginDialogClose() { function pluginDialogClose() {
PluginAppDialog.value = false PluginAppDialog.value = false
@@ -98,7 +94,6 @@ function refreshData() {
// 对uninstalledList进行排序,按PluginStatistics倒序 // 对uninstalledList进行排序,按PluginStatistics倒序
const sortedUninstalledList = computed(() => { const sortedUninstalledList = computed(() => {
const list = uninstalledList.value.filter(item => !item.has_update) const list = uninstalledList.value.filter(item => !item.has_update)
defer = useDefer(list.length)
if (PluginStatistics.value.length === 0) if (PluginStatistics.value.length === 0)
return list return list
return list.sort((a, b) => { return list.sort((a, b) => {
@@ -155,11 +150,14 @@ onBeforeMount(() => {
> >
<!-- Dialog Activator --> <!-- Dialog Activator -->
<template #activator="{ props }"> <template #activator="{ props }">
<VBtn <VFab
icon="mdi-store-plus"
v-bind="props" v-bind="props"
icon="mdi-store-plus"
location="bottom end"
size="x-large" size="x-large"
class="fixed right-5 bottom-5" fixed
app
appear
/> />
</template> </template>
@@ -198,18 +196,13 @@ onBeforeMount(() => {
/> />
</div> </div>
<div v-if="isAppMarketLoaded" class="grid gap-4 grid-plugin-card"> <div v-if="isAppMarketLoaded" class="grid gap-4 grid-plugin-card">
<div <PluginAppCard
v-for="(data, index) in sortedUninstalledList" v-for="data in sortedUninstalledList"
:key="index" :key="`${data.id}_v${data.plugin_version}`"
> :plugin="data"
<PluginAppCard :count="PluginStatistics[data.id || '0']"
v-if="defer(index)" @install="pluginInstalled"
:key="`${data.id}_v${data.plugin_version}`" />
:plugin="data"
:count="PluginStatistics[data.id || '0']"
@install="pluginInstalled"
/>
</div>
</div> </div>
<NoDataFound <NoDataFound
v-if="uninstalledList.length === 0 && isAppMarketLoaded" v-if="uninstalledList.length === 0 && isAppMarketLoaded"
+33 -22
View File
@@ -307,6 +307,30 @@ const dropdownItems = ref([
</script> </script>
<template> <template>
<!-- 底部操作按钮 -->
<VFab
v-if="selected.length > 0"
icon="mdi-trash-can-outline"
color="error"
location="bottom end"
size="x-large"
fixed
app
appear
@click="removeHistoryBatch"
/>
<VFab
v-if="selected.length > 0"
class="mb-2"
icon="mdi-redo-variant"
location="bottom end"
size="x-large"
fixed
app
appear
@click="retransferBatch"
/>
<VCard class="pb-5"> <VCard class="pb-5">
<VCardItem> <VCardItem>
<VCardTitle> <VCardTitle>
@@ -354,29 +378,29 @@ const dropdownItems = ref([
<template #item.title="{ item }"> <template #item.title="{ item }">
<div class="d-flex align-center"> <div class="d-flex align-center">
<VAvatar> <VAvatar>
<VIcon :icon="getIcon(item.value.type || '')" /> <VIcon :icon="getIcon(item.type || '')" />
</VAvatar> </VAvatar>
<div class="d-flex flex-column ms-1"> <div class="d-flex flex-column ms-1">
<span class="d-block text-high-emphasis"> <span class="d-block text-high-emphasis">
{{ item.value.title }} {{ item.value.seasons }}{{ item.value.episodes }} {{ item?.title }} {{ item?.seasons }}{{ item?.episodes }}
</span> </span>
<small>{{ item.value.category }}</small> <small>{{ item?.category }}</small>
</div> </div>
</div> </div>
</template> </template>
<template #item.src="{ item }"> <template #item.src="{ item }">
<small>{{ item.value.src }} <br>=> {{ item.value.dest }}</small> <small>{{ item?.src }} <br>=> {{ item?.dest }}</small>
</template> </template>
<template #item.mode="{ item }"> <template #item.mode="{ item }">
<VChip variant="outlined" color="primary" size="small"> <VChip variant="outlined" color="primary" size="small">
{{ TransferDict[item.value.mode] }} {{ TransferDict[item?.mode || ''] }}
</VChip> </VChip>
</template> </template>
<template #item.status="{ item }"> <template #item.status="{ item }">
<VChip v-if="item.value.status" color="success" size="small"> <VChip v-if="item?.status" color="success" size="small">
成功 成功
</VChip> </VChip>
<v-tooltip v-else :text="item.value.errmsg"> <v-tooltip v-else :text="item?.errmsg">
<template #activator="{ props }"> <template #activator="{ props }">
<VChip v-bind="props" color="error" size="small"> <VChip v-bind="props" color="error" size="small">
失败 失败
@@ -385,7 +409,7 @@ const dropdownItems = ref([
</v-tooltip> </v-tooltip>
</template> </template>
<template #item.date="{ item }"> <template #item.date="{ item }">
<small>{{ item.value.date }}</small> <small>{{ item?.date }}</small>
</template> </template>
<template #item.actions="{ item }"> <template #item.actions="{ item }">
<IconBtn> <IconBtn>
@@ -397,7 +421,7 @@ const dropdownItems = ref([
:key="i" :key="i"
variant="plain" variant="plain"
:base-color="menu.props.color" :base-color="menu.props.color"
@click="menu.props.click(item.value)" @click="menu.props.click(item)"
> >
<template #prepend> <template #prepend>
<VIcon :icon="menu.props.prependIcon" /> <VIcon :icon="menu.props.prependIcon" />
@@ -413,19 +437,6 @@ const dropdownItems = ref([
</template> </template>
</VDataTableServer> </VDataTableServer>
</VCard> </VCard>
<!-- 底部操作按钮 -->
<span v-if="selected.length > 0" class="fixed right-5 bottom-5">
<VTooltip text="批量重新整理">
<template #activator="{ props }">
<VBtn v-bind="props" icon="mdi-redo-variant" class="me-2" color="primary" size="x-large" @click="retransferBatch" />
</template>
</VTooltip>
<VTooltip text="批量删除">
<template #activator="{ props }">
<VBtn v-bind="props" icon="mdi-trash-can-outline" color="error" size="x-large" @click="removeHistoryBatch" />
</template>
</VTooltip>
</span>
<!-- 底部弹窗 --> <!-- 底部弹窗 -->
<VBottomSheet v-model="deleteConfirmDialog" inset> <VBottomSheet v-model="deleteConfirmDialog" inset>
<VCard class="text-center rounded-t"> <VCard class="text-center rounded-t">
+6 -3
View File
@@ -70,13 +70,16 @@ onBeforeMount(fetchData)
error-description="已添加并支持的站点将会在这里显示" error-description="已添加并支持的站点将会在这里显示"
/> />
<!-- 新增站点按钮 --> <!-- 新增站点按钮 -->
<VBtn <VFab
icon="mdi-plus" icon="mdi-plus"
location="bottom end"
size="x-large" size="x-large"
class="fixed right-5 bottom-5" fixed
oper="add" app
appear
@click="siteAddDialog = true" @click="siteAddDialog = true"
/> />
<!-- 新增站点弹窗 -->
<SiteAddEditForm <SiteAddEditForm
v-if="siteAddDialog" v-if="siteAddDialog"
v-model="siteAddDialog" v-model="siteAddDialog"
+9 -6
View File
@@ -93,12 +93,15 @@ const filteredDataList = computed(() => {
/> />
</PullRefresh> </PullRefresh>
<!-- 底部操作按钮 --> <!-- 底部操作按钮 -->
<span class="fixed right-5 bottom-5"> <VFab
<VTooltip text="设置默认订阅规则"> icon="mdi-file-document-edit"
<template #activator="{ props }"> location="bottom end"
<VBtn v-bind="props" icon="mdi-file-document-edit" class="me-2" color="primary" size="x-large" @click="subscribeEditDialog = true" /> size="x-large"
</template> fixed
</vtooltip></span> app
appear
@click="subscribeEditDialog = true"
/>
<!-- 订阅编辑弹窗 --> <!-- 订阅编辑弹窗 -->
<SubscribeEditForm <SubscribeEditForm
v-model="subscribeEditDialog" v-model="subscribeEditDialog"
+4 -4
View File
@@ -7966,10 +7966,10 @@ vuetify-use-dialog@^0.6.0:
dependencies: dependencies:
nanoid "^4.0.2" nanoid "^4.0.2"
vuetify@3.3.5: vuetify@3.5.7:
version "3.3.5" version "3.5.7"
resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.3.5.tgz#b927214d106122240e79f4d65e49bfec0e86e189" resolved "https://registry.yarnpkg.com/vuetify/-/vuetify-3.5.7.tgz#9dfa027a582aa7d2211c8019c33ef7cadd66c5c0"
integrity sha512-vkfPgPmKfSJa+jq6Ov+CTg7L1t2jLPKa7Slef9OrVHcLqg+gLuIj0z4PJE6E9HjFTUbgZShShOGxps52REJRIA== integrity sha512-BFj/puY8odRwY50pRfE1gpawnxreY8PtPb/tDw3oumxSLXhoXw8q6YLA6QUvqZrYEzcYpojxZIYhNWUky2KN1w==
vuex-persistedstate@^4.1.0: vuex-persistedstate@^4.1.0:
version "4.1.0" version "4.1.0"