mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-07-12 16:01:35 +08:00
Merge pull request #80 from maicss/main
This commit is contained in:
@@ -121,6 +121,9 @@ async function updateSiteInfo() {
|
|||||||
<template>
|
<template>
|
||||||
<VDialog
|
<VDialog
|
||||||
scrollable
|
scrollable
|
||||||
|
:close-on-back="false"
|
||||||
|
persistent
|
||||||
|
eager
|
||||||
max-width="60rem"
|
max-width="60rem"
|
||||||
>
|
>
|
||||||
<VCard
|
<VCard
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ function openSearchDialog() {
|
|||||||
<VTextField
|
<VTextField
|
||||||
key="search_navbar"
|
key="search_navbar"
|
||||||
v-model="searchWord"
|
v-model="searchWord"
|
||||||
class="d-none d-lg-block text-disabled"
|
class="d-none d-lg-block text-disabled search-box"
|
||||||
density="compact"
|
density="compact"
|
||||||
variant="solo"
|
variant="solo"
|
||||||
label="搜索电影、电视剧"
|
label="搜索电影、电视剧"
|
||||||
@@ -98,3 +98,9 @@ function openSearchDialog() {
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.search-box div.v-input__control div[role="textbox"] {
|
||||||
|
border: 1px solid rgb(var(--v-theme-background));
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,14 +1,25 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import api from '@/api';
|
||||||
import DefaultLayoutWithVerticalNav from './components/DefaultLayoutWithVerticalNav.vue'
|
import DefaultLayoutWithVerticalNav from './components/DefaultLayoutWithVerticalNav.vue'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
document.addEventListener('visibilitychange', () => {
|
||||||
|
if (document.visibilityState === 'visible') {
|
||||||
|
api.get('user/current')
|
||||||
|
.catch(() => {
|
||||||
|
router.replace('/login')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DefaultLayoutWithVerticalNav>
|
<DefaultLayoutWithVerticalNav>
|
||||||
<router-view v-slot="{ Component }">
|
<router-view v-slot="{ Component }">
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<component :is="Component" v-if="$route.meta.keepAlive" :key="$route.fullPath" />
|
<component :is="Component" v-if="route.meta.keepAlive" :key="route.fullPath" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<component :is="Component" v-if="!$route.meta.keepAlive" :key="$route.fullPath" />
|
<component :is="Component" v-if="!route.meta.keepAlive" :key="route.fullPath" />
|
||||||
</router-view>
|
</router-view>
|
||||||
</DefaultLayoutWithVerticalNav>
|
</DefaultLayoutWithVerticalNav>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -214,6 +214,7 @@ async function loadDownladerSetting() {
|
|||||||
TR_USER,
|
TR_USER,
|
||||||
TR_PASSWORD,
|
TR_PASSWORD,
|
||||||
}
|
}
|
||||||
|
downloaderTab.value = DOWNLOADER === 'qbittorrent' ? 'qbittorrent' : 'transmission'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ onBeforeMount(fetchData)
|
|||||||
@click="siteAddDialog = true"
|
@click="siteAddDialog = true"
|
||||||
/>
|
/>
|
||||||
<SiteAddEditForm
|
<SiteAddEditForm
|
||||||
|
v-if="siteAddDialog"
|
||||||
v-model="siteAddDialog"
|
v-model="siteAddDialog"
|
||||||
oper="add"
|
oper="add"
|
||||||
@save="siteAddDialog = false; fetchData()"
|
@save="siteAddDialog = false; fetchData()"
|
||||||
|
|||||||
Reference in New Issue
Block a user