mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
控制合集搜索项的显示
This commit is contained in:
@@ -3,7 +3,7 @@ import api from '@/api'
|
|||||||
import type { Site, Plugin, Subscribe } from '@/api/types'
|
import type { Site, Plugin, Subscribe } from '@/api/types'
|
||||||
import { getNavMenus, getSettingTabs } from '@/router/i18n-menu'
|
import { getNavMenus, getSettingTabs } from '@/router/i18n-menu'
|
||||||
import { NavMenu } from '@/@layouts/types'
|
import { NavMenu } from '@/@layouts/types'
|
||||||
import { useUserStore } from '@/stores'
|
import { useUserStore, useGlobalSettingsStore } from '@/stores'
|
||||||
import SearchSiteDialog from '@/components/dialog/SearchSiteDialog.vue'
|
import SearchSiteDialog from '@/components/dialog/SearchSiteDialog.vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
@@ -26,6 +26,10 @@ const router = useRouter()
|
|||||||
// 用户 Store
|
// 用户 Store
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
// 全局设置 Store
|
||||||
|
const globalSettingsStore = useGlobalSettingsStore()
|
||||||
|
const globalSettings = globalSettingsStore.globalSettings
|
||||||
|
|
||||||
// 超级用户
|
// 超级用户
|
||||||
const superUser = userStore.superUser
|
const superUser = userStore.superUser
|
||||||
|
|
||||||
@@ -63,6 +67,11 @@ const hasManagePermission = computed(() => {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 是否显示合集搜索项(当SEARCH_SOURCE包含themoviedb时显示)
|
||||||
|
const showCollectionSearch = computed(() => {
|
||||||
|
return globalSettings.SEARCH_SOURCE?.includes('themoviedb') || false
|
||||||
|
})
|
||||||
|
|
||||||
// 所有订阅数据
|
// 所有订阅数据
|
||||||
const SubscribeItems = ref<Subscribe[]>([])
|
const SubscribeItems = ref<Subscribe[]>([])
|
||||||
|
|
||||||
@@ -435,7 +444,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</VHover>
|
</VHover>
|
||||||
|
|
||||||
<VHover>
|
<VHover v-if="showCollectionSearch">
|
||||||
<template #default="hover">
|
<template #default="hover">
|
||||||
<VListItem
|
<VListItem
|
||||||
density="comfortable"
|
density="comfortable"
|
||||||
|
|||||||
Reference in New Issue
Block a user