mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
es lint fix
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
import VerticalNavSectionTitle from "@/@layouts/components/VerticalNavSectionTitle.vue";
|
||||
import VerticalNavLayout from "@layouts/components/VerticalNavLayout.vue";
|
||||
import VerticalNavLink from "@layouts/components/VerticalNavLink.vue";
|
||||
import VerticalNavSectionTitle from '@/@layouts/components/VerticalNavSectionTitle.vue'
|
||||
import VerticalNavLayout from '@layouts/components/VerticalNavLayout.vue'
|
||||
import VerticalNavLink from '@layouts/components/VerticalNavLink.vue'
|
||||
|
||||
// Components
|
||||
import Footer from "@/layouts/components/Footer.vue";
|
||||
import NavbarThemeSwitcher from "@/layouts/components/NavbarThemeSwitcher.vue";
|
||||
import SearchBar from "@/layouts/components/SearchBar.vue";
|
||||
import ShortcutBar from "@/layouts/components/ShortcutBar.vue";
|
||||
import UserProfile from "@/layouts/components/UserProfile.vue";
|
||||
import Footer from '@/layouts/components/Footer.vue'
|
||||
import NavbarThemeSwitcher from '@/layouts/components/NavbarThemeSwitcher.vue'
|
||||
import SearchBar from '@/layouts/components/SearchBar.vue'
|
||||
import ShortcutBar from '@/layouts/components/ShortcutBar.vue'
|
||||
import UserProfile from '@/layouts/components/UserProfile.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -17,7 +17,10 @@ import UserProfile from "@/layouts/components/UserProfile.vue";
|
||||
<template #navbar="{ toggleVerticalOverlayNavActive }">
|
||||
<div class="d-flex h-100 align-center mx-1">
|
||||
<!-- 👉 Vertical Nav Toggle -->
|
||||
<IconBtn class="ms-n2 d-lg-none" @click="toggleVerticalOverlayNavActive(true)">
|
||||
<IconBtn
|
||||
class="ms-n2 d-lg-none"
|
||||
@click="toggleVerticalOverlayNavActive(true)"
|
||||
>
|
||||
<VIcon icon="mdi-menu" />
|
||||
</IconBtn>
|
||||
|
||||
|
||||
@@ -1,35 +1,45 @@
|
||||
<script lang="ts" setup>
|
||||
// 路由
|
||||
const router = useRouter();
|
||||
const router = useRouter()
|
||||
|
||||
// 搜索词
|
||||
const searchWord = ref<string>("");
|
||||
const searchWord = ref<string>('')
|
||||
|
||||
// 搜索弹窗
|
||||
const searchDialog = ref(false);
|
||||
const searchDialog = ref(false)
|
||||
|
||||
// Search
|
||||
const search = () => {
|
||||
if (!searchWord.value) {
|
||||
return;
|
||||
}
|
||||
searchDialog.value = false;
|
||||
function search() {
|
||||
if (!searchWord.value)
|
||||
return
|
||||
|
||||
searchDialog.value = false
|
||||
router.push({
|
||||
path: "/browse/media/search",
|
||||
path: '/browse/media/search',
|
||||
query: {
|
||||
title: searchWord.value,
|
||||
},
|
||||
});
|
||||
};
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 👉 Search Button -->
|
||||
<div class="d-flex align-center cursor-pointer" style="user-select: none">
|
||||
<VDialog v-model="searchDialog" max-width="600" transition="dialog-top-transition">
|
||||
<div
|
||||
class="d-flex align-center cursor-pointer"
|
||||
style="user-select: none"
|
||||
>
|
||||
<VDialog
|
||||
v-model="searchDialog"
|
||||
max-width="600"
|
||||
transition="dialog-top-transition"
|
||||
>
|
||||
<!-- Dialog Activator -->
|
||||
<template #activator="{ props }">
|
||||
<IconBtn class="d-lg-none" v-bind="props">
|
||||
<IconBtn
|
||||
class="d-lg-none"
|
||||
v-bind="props"
|
||||
>
|
||||
<VIcon icon="mdi-magnify" />
|
||||
</IconBtn>
|
||||
</template>
|
||||
@@ -38,14 +48,22 @@ const search = () => {
|
||||
<VCardText>
|
||||
<VRow>
|
||||
<VCol cols="12">
|
||||
<VTextField v-model="searchWord" label="电影、电视剧名称" />
|
||||
<VTextField
|
||||
v-model="searchWord"
|
||||
label="电影、电视剧名称"
|
||||
/>
|
||||
</VCol>
|
||||
</VRow>
|
||||
</VCardText>
|
||||
|
||||
<VCardActions>
|
||||
<VSpacer />
|
||||
<VBtn @click="search" @keydown.enter="search"> 搜索 </VBtn>
|
||||
<VBtn
|
||||
@click="search"
|
||||
@keydown.enter="search"
|
||||
>
|
||||
搜索
|
||||
</VBtn>
|
||||
</VCardActions>
|
||||
</VCard>
|
||||
</VDialog>
|
||||
@@ -63,10 +81,10 @@ const search = () => {
|
||||
append-inner-icon="mdi-magnify"
|
||||
single-line
|
||||
hide-details
|
||||
@click:append-inner="search"
|
||||
@keydown.enter="search"
|
||||
flat
|
||||
rounded
|
||||
@click:append-inner="search"
|
||||
@keydown.enter="search"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<script lang="ts" setup>
|
||||
import NameTestView from "@/views/system/NameTestView.vue";
|
||||
import NetTestView from "@/views/system/NetTestView.vue";
|
||||
import NameTestView from '@/views/system/NameTestView.vue'
|
||||
import NetTestView from '@/views/system/NetTestView.vue'
|
||||
|
||||
// App捷径
|
||||
const appsMenu = ref(false);
|
||||
const appsMenu = ref(false)
|
||||
|
||||
// 名称测试弹窗
|
||||
const nameTestDialog = ref(false);
|
||||
const nameTestDialog = ref(false)
|
||||
|
||||
// 网络测试弹窗
|
||||
const netTestDialog = ref(false);
|
||||
const netTestDialog = ref(false)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -25,7 +25,10 @@ const netTestDialog = ref(false);
|
||||
>
|
||||
<!-- Menu Activator -->
|
||||
<template #activator="{ props }">
|
||||
<IconBtn class="me-2" v-bind="props">
|
||||
<IconBtn
|
||||
class="me-2"
|
||||
v-bind="props"
|
||||
>
|
||||
<VIcon icon="mdi-checkbox-multiple-blank-outline" />
|
||||
</IconBtn>
|
||||
</template>
|
||||
@@ -41,25 +44,44 @@ const netTestDialog = ref(false);
|
||||
</VCardItem>
|
||||
<div class="ps ps--active-y">
|
||||
<VRow class="ma-0 mt-n1">
|
||||
<VCol cols="6" class="text-center cursor-pointer pa-0 shortcut-icon border-e">
|
||||
<VListItem @click="nameTestDialog = true" class="pa-4">
|
||||
<VAvatar size="48" variant="tonal">
|
||||
<VCol
|
||||
cols="6"
|
||||
class="text-center cursor-pointer pa-0 shortcut-icon border-e"
|
||||
>
|
||||
<VListItem
|
||||
class="pa-4"
|
||||
@click="nameTestDialog = true"
|
||||
>
|
||||
<VAvatar
|
||||
size="48"
|
||||
variant="tonal"
|
||||
>
|
||||
<VIcon icon="mdi-text-recognition" />
|
||||
</VAvatar>
|
||||
<h6 class="text-base font-weight-medium mt-2 mb-0">识别</h6>
|
||||
<h6 class="text-base font-weight-medium mt-2 mb-0">
|
||||
识别
|
||||
</h6>
|
||||
<span class="text-sm">名称识别测试</span>
|
||||
</VListItem>
|
||||
</VCol>
|
||||
<VCol
|
||||
@click="() => {}"
|
||||
cols="6"
|
||||
class="text-center cursor-pointer pa-0 shortcut-icon"
|
||||
@click="() => {}"
|
||||
>
|
||||
<VListItem @click="netTestDialog = true" class="pa-4">
|
||||
<VAvatar size="48" variant="tonal">
|
||||
<VListItem
|
||||
class="pa-4"
|
||||
@click="netTestDialog = true"
|
||||
>
|
||||
<VAvatar
|
||||
size="48"
|
||||
variant="tonal"
|
||||
>
|
||||
<VIcon icon="mdi-network-outline" />
|
||||
</VAvatar>
|
||||
<h6 class="text-base font-weight-medium mt-2 mb-0">网络</h6>
|
||||
<h6 class="text-base font-weight-medium mt-2 mb-0">
|
||||
网络
|
||||
</h6>
|
||||
<span class="text-sm">测试网速连通性</span>
|
||||
</VListItem>
|
||||
</VCol>
|
||||
@@ -68,7 +90,10 @@ const netTestDialog = ref(false);
|
||||
</VCard>
|
||||
</VMenu>
|
||||
<!-- 名称测试弹窗 -->
|
||||
<VDialog v-model="nameTestDialog" max-width="800">
|
||||
<VDialog
|
||||
v-model="nameTestDialog"
|
||||
max-width="800"
|
||||
>
|
||||
<VCard title="名称识别测试">
|
||||
<DialogCloseBtn @click="nameTestDialog = false" />
|
||||
<VCardItem>
|
||||
@@ -77,7 +102,10 @@ const netTestDialog = ref(false);
|
||||
</VCard>
|
||||
</VDialog>
|
||||
<!-- 网络测试弹窗 -->
|
||||
<VDialog v-model="netTestDialog" max-width="600">
|
||||
<VDialog
|
||||
v-model="netTestDialog"
|
||||
max-width="600"
|
||||
>
|
||||
<VCard title="网络测试">
|
||||
<DialogCloseBtn @click="netTestDialog = false" />
|
||||
<VCardItem>
|
||||
|
||||
@@ -1,30 +1,46 @@
|
||||
<script setup lang="ts">
|
||||
import router from "@/router";
|
||||
import { useStore } from "vuex";
|
||||
import { useStore } from 'vuex'
|
||||
import router from '@/router'
|
||||
|
||||
// Vuex Store
|
||||
const store = useStore();
|
||||
const store = useStore()
|
||||
|
||||
// 执行注销操作
|
||||
const logout = () => {
|
||||
function logout() {
|
||||
// 清除登录状态信息
|
||||
store.dispatch("auth/clearToken");
|
||||
store.dispatch('auth/clearToken')
|
||||
|
||||
// 重定向到登录页面或其他适当的页面
|
||||
router.push("/login");
|
||||
};
|
||||
router.push('/login')
|
||||
}
|
||||
|
||||
// 获取当前用户信息
|
||||
const accountInfo: any = inject("accountInfo");
|
||||
const accountInfo: any = inject('accountInfo')
|
||||
</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="accountInfo.avatar" />
|
||||
|
||||
<!-- 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>
|
||||
@@ -37,7 +53,10 @@ const accountInfo: any = inject("accountInfo");
|
||||
offset-y="3"
|
||||
color="success"
|
||||
>
|
||||
<VAvatar color="primary" variant="tonal">
|
||||
<VAvatar
|
||||
color="primary"
|
||||
variant="tonal"
|
||||
>
|
||||
<VImg :src="accountInfo.avatar" />
|
||||
</VAvatar>
|
||||
</VBadge>
|
||||
@@ -52,9 +71,16 @@ const accountInfo: any = inject("accountInfo");
|
||||
<VDivider class="my-2" />
|
||||
|
||||
<!-- 👉 Profile -->
|
||||
<VListItem link to="account-setting">
|
||||
<VListItem
|
||||
link
|
||||
to="account-setting"
|
||||
>
|
||||
<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>
|
||||
@@ -66,7 +92,11 @@ const accountInfo: any = inject("accountInfo");
|
||||
target="_blank"
|
||||
>
|
||||
<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>
|
||||
@@ -78,7 +108,11 @@ const accountInfo: any = inject("accountInfo");
|
||||
<!-- 👉 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