mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
fix ui
This commit is contained in:
@@ -8,7 +8,7 @@ const appMode = computed(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="appMode" class="w-100" style="block-size: 3.5rem">
|
<div v-if="appMode" class="w-100" style="block-size: calc(3.5rem + env(safe-area-inset-bottom))">
|
||||||
<VBottomNavigation
|
<VBottomNavigation
|
||||||
grow
|
grow
|
||||||
horizontal
|
horizontal
|
||||||
|
|||||||
+1
-7
@@ -1,5 +1,5 @@
|
|||||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||||
import { configureNProgress, doneNProgress, startNProgress } from '@/api/nprogress'
|
import { configureNProgress } from '@/api/nprogress'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
// Nprogress
|
// Nprogress
|
||||||
@@ -168,17 +168,11 @@ router.beforeEach((to, from, next) => {
|
|||||||
// 总是记录非login路由
|
// 总是记录非login路由
|
||||||
if (to.fullPath != '/login') store.state.auth.originalPath = to.fullPath
|
if (to.fullPath != '/login') store.state.auth.originalPath = to.fullPath
|
||||||
const isAuthenticated = store.state.auth.token !== null
|
const isAuthenticated = store.state.auth.token !== null
|
||||||
|
|
||||||
if (to.meta.requiresAuth && !isAuthenticated) {
|
if (to.meta.requiresAuth && !isAuthenticated) {
|
||||||
next('/login')
|
next('/login')
|
||||||
} else {
|
} else {
|
||||||
startNProgress()
|
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
router.afterEach(() => {
|
|
||||||
doneNProgress()
|
|
||||||
})
|
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|||||||
@@ -185,6 +185,6 @@
|
|||||||
border-block-end: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
|
border-block-end: 1px solid rgba(var(--v-border-color), var(--v-border-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
.v-fab--bottom {
|
.v-fab__container {
|
||||||
padding-block-end: env(safe-area-inset-bottom);
|
padding-block-end: env(safe-area-inset-bottom);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VRow :style="appMode ? 'margin-bottom: 56px' : ''">
|
<VRow>
|
||||||
<VCol>
|
<VCol>
|
||||||
<VList v-if="dataList.length === 0" lines="three" class="rounded p-0 shadow-lg">
|
<VList v-if="dataList.length === 0" lines="three" class="rounded p-0 shadow-lg">
|
||||||
<VListItem>
|
<VListItem>
|
||||||
@@ -132,7 +132,14 @@ onMounted(() => {
|
|||||||
</VListItem>
|
</VListItem>
|
||||||
</VList>
|
</VList>
|
||||||
<VList v-if="dataList.length !== 0" lines="three" class="rounded p-0 torrent-list-vscroll shadow-lg">
|
<VList v-if="dataList.length !== 0" lines="three" class="rounded p-0 torrent-list-vscroll shadow-lg">
|
||||||
<VVirtualScroll :items="dataList">
|
<VVirtualScroll
|
||||||
|
:items="dataList"
|
||||||
|
:style="
|
||||||
|
appMode
|
||||||
|
? 'height: calc(100vh - 6rem - env(safe-area-inset-bottom) - 3.5rem)'
|
||||||
|
: 'height: calc(100vh - 6rem - env(safe-area-inset-bottom)'
|
||||||
|
"
|
||||||
|
>
|
||||||
<template #default="{ item }">
|
<template #default="{ item }">
|
||||||
<TorrentItem :torrent="item" :key="`${item.torrent_info.title}_${item.torrent_info.site}`" />
|
<TorrentItem :torrent="item" :key="`${item.torrent_info.title}_${item.torrent_info.site}`" />
|
||||||
</template>
|
</template>
|
||||||
@@ -140,7 +147,7 @@ onMounted(() => {
|
|||||||
</VList>
|
</VList>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol xl="2" md="3" class="d-none d-md-block">
|
<VCol xl="2" md="3" class="d-none d-md-block">
|
||||||
<VList lines="one" class="rounded torrent-list-vscroll shadow-lg">
|
<VList lines="one" class="rounded shadow-lg" style="height: calc(100vh - 6rem - env(safe-area-inset-bottom)">
|
||||||
<VListSubheader> 排序 </VListSubheader>
|
<VListSubheader> 排序 </VListSubheader>
|
||||||
<VListItem>
|
<VListItem>
|
||||||
<VChipGroup column v-model="sortField">
|
<VChipGroup column v-model="sortField">
|
||||||
@@ -265,15 +272,3 @@ onMounted(() => {
|
|||||||
</VCol>
|
</VCol>
|
||||||
</VRow>
|
</VRow>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
|
||||||
.torrent-list-vscroll {
|
|
||||||
block-size: calc(100vh - 6rem);
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (width <= 768px) {
|
|
||||||
.torrent-list-vscroll {
|
|
||||||
block-size: calc(100vh - 9rem - env(safe-area-inset-bottom));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ onMounted(fetchData)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<VCard :style="appMode ? 'margin-bottom: 56px' : ''">
|
<VCard>
|
||||||
<VCardItem>
|
<VCardItem>
|
||||||
<VCardTitle>
|
<VCardTitle>
|
||||||
<VRow>
|
<VRow>
|
||||||
@@ -395,6 +395,11 @@ onMounted(fetchData)
|
|||||||
loading-text="加载中..."
|
loading-text="加载中..."
|
||||||
class="data-table-div"
|
class="data-table-div"
|
||||||
hover
|
hover
|
||||||
|
:style="
|
||||||
|
appMode
|
||||||
|
? 'height: calc(100vh - 14rem - env(safe-area-inset-bottom) - 3.5rem)'
|
||||||
|
: 'height: calc(100vh - 14rem - env(safe-area-inset-bottom)'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<template #item.title="{ item }">
|
<template #item.title="{ item }">
|
||||||
<div class="d-flex align-center">
|
<div class="d-flex align-center">
|
||||||
@@ -531,14 +536,4 @@ onMounted(fetchData)
|
|||||||
.v-table th {
|
.v-table th {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-table-div {
|
|
||||||
block-size: calc(100vh - 14rem - env(safe-area-inset-bottom));
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (width <= 768px) {
|
|
||||||
.data-table-div {
|
|
||||||
block-size: calc(100vh - 17rem - env(safe-area-inset-bottom));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user