mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-11 18:51:28 +08:00
fix
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { useTheme } from 'vuetify'
|
||||
|
||||
import VerticalNavSectionTitle from '@/@layouts/components/VerticalNavSectionTitle.vue'
|
||||
import upgradeBannerDark from '@images/pro/upgrade-banner-dark.png'
|
||||
import upgradeBannerLight from '@images/pro/upgrade-banner-light.png'
|
||||
import VerticalNavLayout from '@layouts/components/VerticalNavLayout.vue'
|
||||
import VerticalNavLink from '@layouts/components/VerticalNavLink.vue'
|
||||
|
||||
@@ -13,12 +9,6 @@ import NavbarThemeSwitcher from '@/layouts/components/NavbarThemeSwitcher.vue'
|
||||
import UserProfile from '@/layouts/components/UserProfile.vue'
|
||||
|
||||
// Banner
|
||||
|
||||
const vuetifyTheme = useTheme()
|
||||
|
||||
const upgradeBanner = computed(() => {
|
||||
return vuetifyTheme.global.name.value === 'light' ? upgradeBannerLight : upgradeBannerDark
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -93,7 +83,7 @@ const upgradeBanner = computed(() => {
|
||||
to: '/ranking',
|
||||
}"
|
||||
/>
|
||||
|
||||
|
||||
<VerticalNavLink
|
||||
:item="{
|
||||
title: '资源搜索',
|
||||
@@ -142,7 +132,7 @@ const upgradeBanner = computed(() => {
|
||||
to: '/history',
|
||||
}"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 👉 用户设置 -->
|
||||
<VerticalNavSectionTitle
|
||||
:item="{
|
||||
|
||||
@@ -1,24 +1,40 @@
|
||||
<script setup lang="ts">
|
||||
import router from "@/router";
|
||||
import avatar1 from "@images/avatars/avatar-1.png";
|
||||
import router from '@/router'
|
||||
import avatar1 from '@images/avatars/avatar-1.png'
|
||||
|
||||
// 执行注销操作
|
||||
const logout = () => {
|
||||
// 清除登录状态信息,例如删除令牌
|
||||
localStorage.removeItem("token");
|
||||
localStorage.removeItem('token')
|
||||
|
||||
// 重定向到登录页面或其他适当的页面
|
||||
router.push("/login");
|
||||
};
|
||||
router.push('/login')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VBadge dot location="bottom right" offset-x="3" offset-y="3" color="success" bordered>
|
||||
<VAvatar class="cursor-pointer" color="primary" variant="tonal">
|
||||
<VBadge
|
||||
dot
|
||||
location="bottom right"
|
||||
offset-x="3"
|
||||
offset-y="3"
|
||||
color="success"
|
||||
bordered
|
||||
>
|
||||
<VAvatar
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
variant="tonal"
|
||||
>
|
||||
<VImg :src="avatar1" />
|
||||
|
||||
<!-- SECTION Menu -->
|
||||
<VMenu activator="parent" width="230" location="bottom end" offset="14px">
|
||||
<VMenu
|
||||
activator="parent"
|
||||
width="230"
|
||||
location="bottom end"
|
||||
offset="14px"
|
||||
>
|
||||
<VList>
|
||||
<!-- 👉 User Avatar & Name -->
|
||||
<VListItem>
|
||||
@@ -31,22 +47,34 @@ const logout = () => {
|
||||
offset-y="3"
|
||||
color="success"
|
||||
>
|
||||
<VAvatar color="primary" variant="tonal">
|
||||
<VAvatar
|
||||
color="primary"
|
||||
variant="tonal"
|
||||
>
|
||||
<VImg :src="avatar1" />
|
||||
</VAvatar>
|
||||
</VBadge>
|
||||
</VListItemAction>
|
||||
</template>
|
||||
|
||||
<VListItemTitle class="font-weight-semibold"> 管理员 </VListItemTitle>
|
||||
<VListItemTitle class="font-weight-semibold">
|
||||
管理员
|
||||
</VListItemTitle>
|
||||
<VListItemSubtitle>Admin</VListItemSubtitle>
|
||||
</VListItem>
|
||||
<VDivider class="my-2" />
|
||||
|
||||
<!-- 👉 Profile -->
|
||||
<VListItem link to="account-settings">
|
||||
<VListItem
|
||||
link
|
||||
to="account-settings"
|
||||
>
|
||||
<template #prepend>
|
||||
<VIcon class="me-2" icon="mdi-account-outline" size="22" />
|
||||
<VIcon
|
||||
class="me-2"
|
||||
icon="mdi-account-outline"
|
||||
size="22"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<VListItemTitle>个人中心</VListItemTitle>
|
||||
@@ -55,7 +83,11 @@ const logout = () => {
|
||||
<!-- 👉 FAQ -->
|
||||
<VListItem link>
|
||||
<template #prepend>
|
||||
<VIcon class="me-2" icon="mdi-help-circle-outline" size="22" />
|
||||
<VIcon
|
||||
class="me-2"
|
||||
icon="mdi-help-circle-outline"
|
||||
size="22"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<VListItemTitle>帮助</VListItemTitle>
|
||||
@@ -67,7 +99,11 @@ const logout = () => {
|
||||
<!-- 👉 Logout -->
|
||||
<VListItem @click="logout">
|
||||
<template #prepend>
|
||||
<VIcon class="me-2" icon="mdi-logout" size="22" />
|
||||
<VIcon
|
||||
class="me-2"
|
||||
icon="mdi-logout"
|
||||
size="22"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<VListItemTitle>注销</VListItemTitle>
|
||||
|
||||
Reference in New Issue
Block a user