1
This commit is contained in:
37
src/views/HomeView.vue
Normal file
37
src/views/HomeView.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<script setup>
|
||||
import { useRouter } from "vue-router";
|
||||
import { useAuthStore } from "../stores/auth";
|
||||
|
||||
const router = useRouter();
|
||||
const auth = useAuthStore();
|
||||
|
||||
function onLogout() {
|
||||
auth.logout();
|
||||
router.push({ name: "login" });
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="flex h-full flex-col items-center justify-center gap-6 bg-bg-base p-8"
|
||||
style="
|
||||
background:
|
||||
radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0, 229, 255, 0.08), transparent),
|
||||
var(--color-bg-base);
|
||||
"
|
||||
>
|
||||
<div class="text-center">
|
||||
<p class="font-mono text-xs tracking-widest text-text-muted uppercase">
|
||||
已连接
|
||||
</p>
|
||||
<h1 class="gradient-text mt-2 text-2xl font-bold">
|
||||
欢迎,{{ auth.currentUser?.username }}
|
||||
</h1>
|
||||
<p class="mt-3 max-w-sm text-sm text-text-muted">
|
||||
主界面开发中。当前为登录成功占位页。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<Button label="退出登录" severity="secondary" outlined @click="onLogout" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user