mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-11 18:10:49 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ffe354770 | ||
|
|
52e0d3a4bc | ||
|
|
e865a5ca62 | ||
|
|
528a4ddb03 | ||
|
|
36f3b649c6 | ||
|
|
ce91c0cc30 | ||
|
|
e31e9e3520 | ||
|
|
df313ebe7f |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "moviepilot",
|
"name": "moviepilot",
|
||||||
"version": "1.9.2-2",
|
"version": "1.9.2-3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"bin": "dist/service.js",
|
"bin": "dist/service.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -85,14 +85,14 @@ const superUser = store.state.auth.superUser
|
|||||||
:item="{
|
:item="{
|
||||||
title: '电影',
|
title: '电影',
|
||||||
icon: 'mdi-movie-check-outline',
|
icon: 'mdi-movie-check-outline',
|
||||||
to: '/subscribe-movie',
|
to: '/subscribe-movie/mysub',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<VerticalNavLink
|
<VerticalNavLink
|
||||||
:item="{
|
:item="{
|
||||||
title: '电视剧',
|
title: '电视剧',
|
||||||
icon: 'mdi-television-classic',
|
icon: 'mdi-television-classic',
|
||||||
to: '/subscribe-tv',
|
to: '/subscribe-tv/mysub',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<VerticalNavLink
|
<VerticalNavLink
|
||||||
@@ -144,7 +144,7 @@ const superUser = store.state.auth.superUser
|
|||||||
:item="{
|
:item="{
|
||||||
title: '插件',
|
title: '插件',
|
||||||
icon: 'mdi-apps',
|
icon: 'mdi-apps',
|
||||||
to: '/plugins',
|
to: '/plugins/installed',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
<VerticalNavLink
|
<VerticalNavLink
|
||||||
@@ -160,7 +160,7 @@ const superUser = store.state.auth.superUser
|
|||||||
:item="{
|
:item="{
|
||||||
title: '设定',
|
title: '设定',
|
||||||
icon: 'mdi-cog',
|
icon: 'mdi-cog',
|
||||||
to: '/setting',
|
to: '/setting/account',
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -158,7 +158,8 @@ async function loadDashboardConfig() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 是否拉升高度
|
// 是否拉升高度
|
||||||
isElevated.value = localStorage.getItem('MP_DASHBOARD_ELEVATED') === 'true'
|
const local_elevated = localStorage.getItem('MP_DASHBOARD_ELEVATED')
|
||||||
|
if (local_elevated) isElevated.value = local_elevated === 'true'
|
||||||
// 排序
|
// 排序
|
||||||
if (orderConfig.value) {
|
if (orderConfig.value) {
|
||||||
sortDashboardConfigs()
|
sortDashboardConfigs()
|
||||||
@@ -179,7 +180,7 @@ function sortDashboardConfigs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 设置项目
|
// 设置项目
|
||||||
function saveDashboardConfig() {
|
async function saveDashboardConfig() {
|
||||||
// 启用配置
|
// 启用配置
|
||||||
const data = JSON.stringify(enableConfig.value)
|
const data = JSON.stringify(enableConfig.value)
|
||||||
localStorage.setItem('MP_DASHBOARD', data)
|
localStorage.setItem('MP_DASHBOARD', data)
|
||||||
@@ -190,12 +191,12 @@ function saveDashboardConfig() {
|
|||||||
localStorage.setItem('MP_DASHBOARD_ELEVATED', isElevated.value.toString())
|
localStorage.setItem('MP_DASHBOARD_ELEVATED', isElevated.value.toString())
|
||||||
// 保存到服务端
|
// 保存到服务端
|
||||||
try {
|
try {
|
||||||
api.post('/user/config/Dashboard', data, {
|
await api.post('/user/config/Dashboard', data, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
api.post('/user/config/DashboardOrder', order, {
|
await api.post('/user/config/DashboardOrder', order, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
},
|
},
|
||||||
@@ -339,7 +340,7 @@ onBeforeMount(async () => {
|
|||||||
</VRow>
|
</VRow>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VSwitch v-model="isElevated" label="高度拉升" />
|
<VSwitch v-model="isElevated" label="自适应组件高度" />
|
||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ const tabs = [
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab" show-arrows class="v-tabs-pill">
|
<VTabs v-model="activeTab" show-arrows class="v-tabs-pill">
|
||||||
<VTab v-for="item in tabs" :key="item.icon" :value="item.tab">
|
<VTab v-for="item in tabs" :key="item.icon" :value="item.tab" :to="'/setting/' + item.tab">
|
||||||
<VIcon size="20" start :icon="item.icon" />
|
<VIcon size="20" start :icon="item.icon" />
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</VTab>
|
</VTab>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const activeTab = ref(route.params.tab)
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab">
|
<VTabs v-model="activeTab">
|
||||||
<VTab v-for="item in tabs" :value="item.tab">
|
<VTab v-for="item in tabs" :value="item.tab" :to="'/subscribe-movie/' + item.tab">
|
||||||
<span class="mx-5">{{ item.title }}</span>
|
<span class="mx-5">{{ item.title }}</span>
|
||||||
</VTab>
|
</VTab>
|
||||||
</VTabs>
|
</VTabs>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const activeTab = ref(route.params.tab)
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab">
|
<VTabs v-model="activeTab">
|
||||||
<VTab v-for="item in tabs" :value="item.tab">
|
<VTab v-for="item in tabs" :value="item.tab" :to="'/subscribe-tv/' + item.tab">
|
||||||
<span class="mx-5">{{ item.title }}</span>
|
<span class="mx-5">{{ item.title }}</span>
|
||||||
</VTab>
|
</VTab>
|
||||||
</VTabs>
|
</VTabs>
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ const router = createRouter({
|
|||||||
history: createWebHashHistory(import.meta.env.BASE_URL),
|
history: createWebHashHistory(import.meta.env.BASE_URL),
|
||||||
scrollBehavior(to, from, savedPosition) {
|
scrollBehavior(to, from, savedPosition) {
|
||||||
// 如果页面有缓存那么恢复其位置, 否则始终滚动到顶部
|
// 如果页面有缓存那么恢复其位置, 否则始终滚动到顶部
|
||||||
if (to.meta.keepAlive && savedPosition)
|
if (to.meta.keepAlive && savedPosition) return savedPosition
|
||||||
return savedPosition
|
|
||||||
return { top: 0 }
|
return { top: 0 }
|
||||||
},
|
},
|
||||||
routes: [
|
routes: [
|
||||||
@@ -43,14 +42,14 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'subscribe-movie',
|
path: 'subscribe-movie/:tab',
|
||||||
component: () => import('../pages/subscribe-movie.vue'),
|
component: () => import('../pages/subscribe-movie.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'subscribe-tv',
|
path: 'subscribe-tv/:tab',
|
||||||
component: () => import('../pages/subscribe-tv.vue'),
|
component: () => import('../pages/subscribe-tv.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
@@ -85,14 +84,14 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'plugins',
|
path: 'plugins/:tab',
|
||||||
component: () => import('../pages/plugin.vue'),
|
component: () => import('../pages/plugin.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'setting',
|
path: 'setting/:tab',
|
||||||
component: () => import('../pages/setting.vue'),
|
component: () => import('../pages/setting.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
@@ -165,8 +164,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
|
|
||||||
if (to.meta.requiresAuth && !isAuthenticated) {
|
if (to.meta.requiresAuth && !isAuthenticated) {
|
||||||
next('/login')
|
next('/login')
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
startNProgress()
|
startNProgress()
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ const activeTab = ref(route.params.tab)
|
|||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
title: '我的插件',
|
title: '我的插件',
|
||||||
tab: 'myplugin',
|
tab: 'installed',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '插件市场',
|
title: '插件市场',
|
||||||
tab: 'pluginmarket',
|
tab: 'market',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -330,14 +330,14 @@ onBeforeMount(async () => {
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VTabs v-model="activeTab">
|
<VTabs v-model="activeTab">
|
||||||
<VTab v-for="item in tabs" :value="item.tab">
|
<VTab v-for="item in tabs" :value="item.tab" :to="'/plugins/' + item.tab">
|
||||||
<span class="mx-5">{{ item.title }}</span>
|
<span class="mx-5">{{ item.title }}</span>
|
||||||
</VTab>
|
</VTab>
|
||||||
</VTabs>
|
</VTabs>
|
||||||
|
|
||||||
<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="myplugin">
|
<VWindowItem value="installed">
|
||||||
<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" />
|
||||||
@@ -363,7 +363,7 @@ onBeforeMount(async () => {
|
|||||||
</transition>
|
</transition>
|
||||||
</VWindowItem>
|
</VWindowItem>
|
||||||
<!-- 插件市场 -->
|
<!-- 插件市场 -->
|
||||||
<VWindowItem value="pluginmarket">
|
<VWindowItem value="market">
|
||||||
<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" />
|
||||||
|
|||||||
Reference in New Issue
Block a user