mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-08 09:16:58 +08:00
feat: 更新插件市场设置对话框和订阅页面
This commit is contained in:
@@ -2,11 +2,6 @@
|
|||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import { useToast } from 'vue-toast-notification'
|
import { useToast } from 'vue-toast-notification'
|
||||||
|
|
||||||
// 输入参数
|
|
||||||
const props = defineProps({
|
|
||||||
title: String,
|
|
||||||
})
|
|
||||||
|
|
||||||
const $toast = useToast()
|
const $toast = useToast()
|
||||||
|
|
||||||
// 插件仓库设置字符串
|
// 插件仓库设置字符串
|
||||||
@@ -47,8 +42,14 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VDialog width="50rem" scrollable max-height="85vh">
|
<VDialog width="50rem" scrollable max-height="85vh">
|
||||||
<VCard title="插件仓库设置" class="rounded-t">
|
<VCard class="rounded-t">
|
||||||
|
<VCardItem>
|
||||||
|
<VCardTitle>
|
||||||
|
<VIcon icon="mdi-store-cog" class="me-2" />
|
||||||
|
插件仓库设置
|
||||||
|
</VCardTitle>
|
||||||
<DialogCloseBtn @click="emit('close')" />
|
<DialogCloseBtn @click="emit('close')" />
|
||||||
|
</VCardItem>
|
||||||
<VCardText class="pt-2">
|
<VCardText class="pt-2">
|
||||||
<VTextarea
|
<VTextarea
|
||||||
v-model="repoString"
|
v-model="repoString"
|
||||||
|
|||||||
@@ -305,11 +305,6 @@ watch(currentCategory, () => {
|
|||||||
max-inline-size: 100%;
|
max-inline-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.settings-icon-button {
|
|
||||||
flex-shrink: 0;
|
|
||||||
min-inline-size: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.recommend-content {
|
.recommend-content {
|
||||||
padding-block: 0;
|
padding-block: 0;
|
||||||
padding-inline: 16px;
|
padding-inline: 16px;
|
||||||
|
|||||||
+29
-29
@@ -2,8 +2,9 @@
|
|||||||
import SubscribeListView from '@/views/subscribe/SubscribeListView.vue'
|
import SubscribeListView from '@/views/subscribe/SubscribeListView.vue'
|
||||||
import SubscribePopularView from '@/views/subscribe/SubscribePopularView.vue'
|
import SubscribePopularView from '@/views/subscribe/SubscribePopularView.vue'
|
||||||
import SubscribeShareView from '@/views/subscribe/SubscribeShareView.vue'
|
import SubscribeShareView from '@/views/subscribe/SubscribeShareView.vue'
|
||||||
|
import SubscribeEditDialog from '@/components/dialog/SubscribeEditDialog.vue'
|
||||||
|
|
||||||
import { SubscribeMovieTabs, SubscribeTvTabs } from '@/router/menu'
|
import { SubscribeMovieTabs, SubscribeTvTabs } from '@/router/menu'
|
||||||
import router from '@/router'
|
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
@@ -11,52 +12,41 @@ const subType = route.meta.subType?.toString()
|
|||||||
const subId = ref(route.query.id as string)
|
const subId = ref(route.query.id as string)
|
||||||
const activeTab = ref(route.query.tab)
|
const activeTab = ref(route.query.tab)
|
||||||
|
|
||||||
function jumpTab(tab: string) {
|
// 弹窗
|
||||||
router.push('/subscribe/movie?tab=' + tab)
|
const subscribeEditDialog = ref(false)
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab" show-arrows stacked>
|
<VHeaderTab :items="subType == '电影' ? SubscribeMovieTabs : SubscribeTvTabs" v-model="activeTab">
|
||||||
<VTab
|
<template #append>
|
||||||
v-if="subType == '电影'"
|
<VBtn
|
||||||
v-for="item in SubscribeMovieTabs"
|
icon="mdi-clipboard-edit"
|
||||||
:value="item.tab"
|
variant="text"
|
||||||
@to="jumpTab(item.tab)"
|
color="primary"
|
||||||
class="px-10 rounded-t-lg"
|
size="default"
|
||||||
>
|
class="settings-icon-button"
|
||||||
<VIcon size="x-large" start :icon="item.icon" />
|
@click="subscribeEditDialog = true"
|
||||||
{{ item.title }}
|
/>
|
||||||
</VTab>
|
</template>
|
||||||
<VTab
|
</VHeaderTab>
|
||||||
v-if="subType == '电视剧'"
|
|
||||||
v-for="item in SubscribeTvTabs"
|
|
||||||
:value="item.tab"
|
|
||||||
@to="jumpTab(item.tab)"
|
|
||||||
class="px-10 rounded-t-lg"
|
|
||||||
>
|
|
||||||
<VIcon size="x-large" start :icon="item.icon" />
|
|
||||||
{{ item.title }}
|
|
||||||
</VTab>
|
|
||||||
</VTabs>
|
|
||||||
|
|
||||||
<VWindow v-model="activeTab" class="disable-tab-transition" :touch="false">
|
<VWindow v-model="activeTab" class="disable-tab-transition" :touch="false">
|
||||||
<VWindowItem value="mysub">
|
<VWindowItem value="我的订阅">
|
||||||
<transition name="fade-slide" appear>
|
<transition name="fade-slide" appear>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<SubscribeListView :type="subType" :subid="subId" />
|
<SubscribeListView :type="subType" :subid="subId" />
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
<VWindowItem value="popular">
|
<VWindowItem value="热门订阅">
|
||||||
<transition name="fade-slide" appear>
|
<transition name="fade-slide" appear>
|
||||||
<div>
|
<div>
|
||||||
<SubscribePopularView :type="subType" />
|
<SubscribePopularView :type="subType" />
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
<VWindowItem value="share">
|
<VWindowItem value="订阅分享">
|
||||||
<transition name="fade-slide" appear>
|
<transition name="fade-slide" appear>
|
||||||
<div>
|
<div>
|
||||||
<SubscribeShareView />
|
<SubscribeShareView />
|
||||||
@@ -64,5 +54,15 @@ function jumpTab(tab: string) {
|
|||||||
</transition>
|
</transition>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
</VWindow>
|
</VWindow>
|
||||||
|
|
||||||
|
<!-- 订阅编辑弹窗 -->
|
||||||
|
<SubscribeEditDialog
|
||||||
|
v-if="subscribeEditDialog"
|
||||||
|
v-model="subscribeEditDialog"
|
||||||
|
:default="true"
|
||||||
|
:type="subType"
|
||||||
|
@save="subscribeEditDialog = false"
|
||||||
|
@close="subscribeEditDialog = false"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -314,3 +314,8 @@ html.v-overlay-scroll-blocked body {
|
|||||||
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content > .v-card {
|
.v-bottom-sheet > .v-bottom-sheet__content.v-overlay__content > .v-card {
|
||||||
padding-block-end: env(safe-area-inset-bottom);
|
padding-block-end: env(safe-area-inset-bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-icon-button {
|
||||||
|
flex-shrink: 0;
|
||||||
|
min-inline-size: auto;
|
||||||
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const display = useDisplay()
|
|||||||
const appMode = inject('pwaMode') && display.mdAndDown.value
|
const appMode = inject('pwaMode') && display.mdAndDown.value
|
||||||
|
|
||||||
// 当前标签
|
// 当前标签
|
||||||
const activeTab = ref(route.query.tab)
|
const activeTab = ref('我的插件')
|
||||||
|
|
||||||
// 插件ID参数
|
// 插件ID参数
|
||||||
const pluginId = ref(route.query.id)
|
const pluginId = ref(route.query.id)
|
||||||
@@ -397,16 +397,22 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab" show-arrows stacked>
|
<VHeaderTab :items="PluginTabs" v-model="activeTab">
|
||||||
<VTab v-for="item in PluginTabs" :value="item.tab" class="px-10 rounded-t-lg">
|
<template #append>
|
||||||
<VIcon size="x-large" start :icon="item.icon" />
|
<VBtn
|
||||||
{{ item.title }}
|
icon="mdi-store-cog"
|
||||||
</VTab>
|
variant="text"
|
||||||
</VTabs>
|
color="primary"
|
||||||
|
size="default"
|
||||||
|
class="settings-icon-button"
|
||||||
|
@click="MarketSettingDialog = true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</VHeaderTab>
|
||||||
|
|
||||||
<VWindow v-model="activeTab" class="mt-5 disable-tab-transition" :touch="false">
|
<VWindow v-model="activeTab" class="mt-5 disable-tab-transition" :touch="false">
|
||||||
<!-- 我的插件 -->
|
<!-- 我的插件 -->
|
||||||
<VWindowItem value="installed">
|
<VWindowItem value="我的插件">
|
||||||
<transition name="fade-slide" appear>
|
<transition name="fade-slide" appear>
|
||||||
<div>
|
<div>
|
||||||
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
|
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
|
||||||
@@ -440,7 +446,7 @@ onMounted(async () => {
|
|||||||
</transition>
|
</transition>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
<!-- 插件市场 -->
|
<!-- 插件市场 -->
|
||||||
<VWindowItem value="market">
|
<VWindowItem value="插件市场">
|
||||||
<transition name="fade-slide" appear>
|
<transition name="fade-slide" appear>
|
||||||
<div>
|
<div>
|
||||||
<LoadingBanner v-if="!isAppMarketLoaded" class="mt-12" />
|
<LoadingBanner v-if="!isAppMarketLoaded" class="mt-12" />
|
||||||
@@ -519,18 +525,6 @@ onMounted(async () => {
|
|||||||
app
|
app
|
||||||
appear
|
appear
|
||||||
@click="SearchDialog = true"
|
@click="SearchDialog = true"
|
||||||
:class="appMode ? 'mb-28' : 'mb-16'"
|
|
||||||
/>
|
|
||||||
<!-- 插件市场设置图标 -->
|
|
||||||
<VFab
|
|
||||||
icon="mdi-store-cog"
|
|
||||||
color="warning"
|
|
||||||
location="bottom"
|
|
||||||
size="x-large"
|
|
||||||
fixed
|
|
||||||
app
|
|
||||||
appear
|
|
||||||
@click="MarketSettingDialog = true"
|
|
||||||
:class="{ 'mb-12': appMode }"
|
:class="{ 'mb-12': appMode }"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import api from '@/api'
|
|||||||
import type { Subscribe } from '@/api/types'
|
import type { Subscribe } from '@/api/types'
|
||||||
import NoDataFound from '@/components/NoDataFound.vue'
|
import NoDataFound from '@/components/NoDataFound.vue'
|
||||||
import SubscribeCard from '@/components/cards/SubscribeCard.vue'
|
import SubscribeCard from '@/components/cards/SubscribeCard.vue'
|
||||||
import SubscribeEditDialog from '@/components/dialog/SubscribeEditDialog.vue'
|
|
||||||
import SubscribeHistoryDialog from '@/components/dialog/SubscribeHistoryDialog.vue'
|
import SubscribeHistoryDialog from '@/components/dialog/SubscribeHistoryDialog.vue'
|
||||||
import { useUserStore } from '@/stores'
|
import { useUserStore } from '@/stores'
|
||||||
import { useDisplay } from 'vuetify'
|
import { useDisplay } from 'vuetify'
|
||||||
@@ -35,9 +34,6 @@ const loading = ref(false)
|
|||||||
// 数据列表
|
// 数据列表
|
||||||
const dataList = ref<Subscribe[]>([])
|
const dataList = ref<Subscribe[]>([])
|
||||||
|
|
||||||
// 弹窗
|
|
||||||
const subscribeEditDialog = ref(false)
|
|
||||||
|
|
||||||
// 历史记录弹窗
|
// 历史记录弹窗
|
||||||
const historyDialog = ref(false)
|
const historyDialog = ref(false)
|
||||||
|
|
||||||
@@ -165,23 +161,12 @@ onActivated(async () => {
|
|||||||
/>
|
/>
|
||||||
<!-- 底部操作按钮 -->
|
<!-- 底部操作按钮 -->
|
||||||
<div v-if="isRefreshed">
|
<div v-if="isRefreshed">
|
||||||
<VFab
|
|
||||||
v-if="userStore.superUser"
|
|
||||||
icon="mdi-clipboard-edit"
|
|
||||||
location="bottom"
|
|
||||||
size="x-large"
|
|
||||||
fixed
|
|
||||||
app
|
|
||||||
appear
|
|
||||||
@click="subscribeEditDialog = true"
|
|
||||||
:class="{ 'mb-12': appMode }"
|
|
||||||
/>
|
|
||||||
<VFab
|
<VFab
|
||||||
v-if="userStore.superUser"
|
v-if="userStore.superUser"
|
||||||
icon="mdi-history"
|
icon="mdi-history"
|
||||||
color="info"
|
color="info"
|
||||||
location="bottom"
|
location="bottom"
|
||||||
:class="appMode ? 'mb-28' : 'mb-16'"
|
:class="{ 'mb-12': appMode }"
|
||||||
size="x-large"
|
size="x-large"
|
||||||
fixed
|
fixed
|
||||||
app
|
app
|
||||||
@@ -189,15 +174,6 @@ onActivated(async () => {
|
|||||||
@click="historyDialog = true"
|
@click="historyDialog = true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 订阅编辑弹窗 -->
|
|
||||||
<SubscribeEditDialog
|
|
||||||
v-if="subscribeEditDialog"
|
|
||||||
v-model="subscribeEditDialog"
|
|
||||||
:default="true"
|
|
||||||
:type="props.type"
|
|
||||||
@save="subscribeEditDialog = false"
|
|
||||||
@close="subscribeEditDialog = false"
|
|
||||||
/>
|
|
||||||
<!-- 历史记录弹窗 -->
|
<!-- 历史记录弹窗 -->
|
||||||
<SubscribeHistoryDialog
|
<SubscribeHistoryDialog
|
||||||
v-if="historyDialog"
|
v-if="historyDialog"
|
||||||
|
|||||||
Reference in New Issue
Block a user