add: guard in router
This commit is contained in:
50
src/components/ui/LoadingModal.vue
Normal file
50
src/components/ui/LoadingModal.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<script setup>
|
||||
import { useAuthStore } from '../../stores/auth';
|
||||
const auth = useAuthStore();
|
||||
</script>
|
||||
<template>
|
||||
<div class="noty-fixed" v-if="auth.checking">
|
||||
<div class="content-noty">
|
||||
<div class="body">
|
||||
<img src="/images/logo.png" alt="logo" class="logo animate__animated animate__rubberBand">
|
||||
<h2>Cargando...</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.noty-fixed {
|
||||
position: fixed;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
}
|
||||
.content-noty {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
padding: 16px 32px;
|
||||
background-color: #FFF;
|
||||
/* opacity: 0.9; */
|
||||
}
|
||||
|
||||
.body {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
align-content: center;
|
||||
margin: 0 auto;
|
||||
gap: 5rem;
|
||||
/* align-content: center; */
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user