mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-14 09:38:13 +08:00
⏪️ revert 0141012f,保留必要快捷入口
*签到页用于签到 *战绩页用于1034 *酒馆页用于米社跳转
This commit is contained in:
@@ -30,7 +30,7 @@
|
|||||||
<img src="/platforms/mhy/mys.webp" alt="mihoyo" class="side-icon" />
|
<img src="/platforms/mhy/mys.webp" alt="mihoyo" class="side-icon" />
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-list-item title="帖子" value="posts" :link="true" href="/posts">
|
<v-list-item title="酒馆" value="posts" :link="true" href="/posts">
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<img src="/source/UI/posts.png" alt="posts" class="side-icon" />
|
<img src="/source/UI/posts.png" alt="posts" class="side-icon" />
|
||||||
</template>
|
</template>
|
||||||
@@ -98,11 +98,42 @@
|
|||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list-group>
|
</v-list-group>
|
||||||
<div class="bottom-menu">
|
<div class="bottom-menu">
|
||||||
<v-list-item :title="userInfo.nickname">
|
<v-menu :open-on-click="true" location="end">
|
||||||
<template #prepend>
|
<template #activator="{ props }">
|
||||||
<img :src="userInfo.avatar" alt="userIcon" class="side-icon" />
|
<v-list-item :title="userInfo.nickname" v-bind="props">
|
||||||
|
<template #prepend>
|
||||||
|
<img :src="userInfo.avatar" alt="userIcon" class="side-icon" />
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
<v-list class="side-list-user" density="compact" :nav="true">
|
||||||
|
<v-list-item class="side-item-user" title="签到" @click="openClient('sign_in')">
|
||||||
|
<template #prepend>
|
||||||
|
<img src="/source/UI/userGacha.webp" class="side-icon-user" alt="sing_in" />
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item class="side-item-user" title="战绩" @click="openClient('game_record')">
|
||||||
|
<template #prepend>
|
||||||
|
<img src="/source/UI/userRecord.webp" class="side-icon-user" alt="game_record" />
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item class="side-item-user" title="酒馆" @click="openClient('tavern')">
|
||||||
|
<template #prepend>
|
||||||
|
<img src="/platforms/mhy/mys.webp" alt="酒馆" class="side-icon-user" />
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item
|
||||||
|
class="side-item-user"
|
||||||
|
title="登录"
|
||||||
|
@click="login"
|
||||||
|
v-show="userStore.cookie?.game_token === ''"
|
||||||
|
>
|
||||||
|
<template #prepend>
|
||||||
|
<img src="/source/UI/defaultUser.webp" class="side-icon-user" alt="login" />
|
||||||
|
</template>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list>
|
||||||
|
</v-menu>
|
||||||
<v-list-item :title="themeTitle" @click="switchTheme()">
|
<v-list-item :title="themeTitle" @click="switchTheme()">
|
||||||
<template #prepend>
|
<template #prepend>
|
||||||
<v-icon>
|
<v-icon>
|
||||||
@@ -127,6 +158,7 @@ import { computed, onMounted, ref } from "vue";
|
|||||||
import { useAppStore } from "../../store/modules/app";
|
import { useAppStore } from "../../store/modules/app";
|
||||||
import { useUserStore } from "../../store/modules/user";
|
import { useUserStore } from "../../store/modules/user";
|
||||||
import mhyClient from "../../utils/TGClient";
|
import mhyClient from "../../utils/TGClient";
|
||||||
|
import showSnackbar from "../func/snackbar";
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@@ -190,6 +222,20 @@ async function listenOnTheme(): Promise<void> {
|
|||||||
async function switchTheme(): Promise<void> {
|
async function switchTheme(): Promise<void> {
|
||||||
await event.emit("readTheme", themeGet.value === "default" ? "dark" : "default");
|
await event.emit("readTheme", themeGet.value === "default" ? "dark" : "default");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function openClient(func: string): Promise<void> {
|
||||||
|
if (appStore.isLogin) {
|
||||||
|
await mhyClient.open(func);
|
||||||
|
} else {
|
||||||
|
login();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function login(): void {
|
||||||
|
showSnackbar({
|
||||||
|
text: "请前往设置页面扫码登录",
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
@@ -215,4 +261,22 @@ async function switchTheme(): Promise<void> {
|
|||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.side-list-user {
|
||||||
|
background: var(--app-side-bg) !important;
|
||||||
|
color: var(--app-side-content) !important;
|
||||||
|
font-family: var(--font-title);
|
||||||
|
}
|
||||||
|
|
||||||
|
.side-item-user {
|
||||||
|
border: 1px solid var(--common-shadow-2);
|
||||||
|
background: var(--box-bg-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.side-icon-user {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user