setup route for first user
This commit is contained in:
parent
91ff0835fb
commit
6d9e75bb0c
20 changed files with 455 additions and 30 deletions
|
@ -1,4 +1,7 @@
|
|||
<template>
|
||||
<Modal />
|
||||
<ContextMenu />
|
||||
|
||||
<Header @contextmenu.prevent />
|
||||
<div class="grow overflow-x-hidden overflow-y-auto p-2 md:p-4" @contextmenu.prevent>
|
||||
<RouterView />
|
||||
|
@ -14,6 +17,8 @@ import Footer from "./components/Footer.vue";
|
|||
import { mapState } from "pinia";
|
||||
import { useAuthStore } from "./stores/auth";
|
||||
import { isAuthenticatedPromise } from "./router/authGuards";
|
||||
import ContextMenu from "./components/ContextMenu.vue";
|
||||
import Modal from "./components/Modal.vue";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -25,6 +30,7 @@ export default defineComponent({
|
|||
if (!this.authCheck && localStorage.getItem("access_token")) {
|
||||
isAuthenticatedPromise().catch(() => {
|
||||
localStorage.removeItem("access_token");
|
||||
localStorage.removeItem("refresh_token");
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue