math/ui/src/components/Admin.vue

27 lines
661 B
Vue

<template>
<v-sheet class="d-flex align-center justify-center flex-wrap text-center mx-auto px-4" v-if="authStore.adminToken == ''"
width="640" height="670">
<v-sheet class="v-center" height="100%">
<LoginForm></LoginForm>
</v-sheet>
</v-sheet>
<AdminPanel v-else></AdminPanel>
</template>
<script setup lang="ts">
import { useAuthStore } from '@/store/auth';
import LoginForm from './admin/LoginForm.vue';
import AdminPanel from './admin/AdminPanel.vue';
const authStore = useAuthStore();
</script>
<style lang="scss" scoped>
.v-center {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
</style>