Merge pull request #80 from maicss/main

This commit is contained in:
jxxghp
2024-03-02 09:14:56 +08:00
committed by GitHub
5 changed files with 25 additions and 3 deletions

View File

@@ -121,6 +121,9 @@ async function updateSiteInfo() {
<template>
<VDialog
scrollable
:close-on-back="false"
persistent
eager
max-width="60rem"
>
<VCard

View File

@@ -84,7 +84,7 @@ function openSearchDialog() {
<VTextField
key="search_navbar"
v-model="searchWord"
class="d-none d-lg-block text-disabled"
class="d-none d-lg-block text-disabled search-box"
density="compact"
variant="solo"
label="搜索电影、电视剧"
@@ -98,3 +98,9 @@ function openSearchDialog() {
/>
</span>
</template>
<style lang="scss">
.search-box div.v-input__control div[role="textbox"] {
border: 1px solid rgb(var(--v-theme-background));
}
</style>

View File

@@ -1,14 +1,25 @@
<script lang="ts" setup>
import api from '@/api';
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>
<template>
<DefaultLayoutWithVerticalNav>
<router-view v-slot="{ Component }">
<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>
<component :is="Component" v-if="!$route.meta.keepAlive" :key="$route.fullPath" />
<component :is="Component" v-if="!route.meta.keepAlive" :key="route.fullPath" />
</router-view>
</DefaultLayoutWithVerticalNav>
</template>

View File

@@ -214,6 +214,7 @@ async function loadDownladerSetting() {
TR_USER,
TR_PASSWORD,
}
downloaderTab.value = DOWNLOADER === 'qbittorrent' ? 'qbittorrent' : 'transmission'
}
}
catch (error) {

View File

@@ -68,6 +68,7 @@ onBeforeMount(fetchData)
@click="siteAddDialog = true"
/>
<SiteAddEditForm
v-if="siteAddDialog"
v-model="siteAddDialog"
oper="add"
@save="siteAddDialog = false; fetchData()"