From: Adam Dullage Date: Fri, 17 Oct 2025 11:24:58 +0000 (+0100) Subject: Move loadStoredToken call to index.js before the app is mounted X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=e1e1c445091845d3486bc1fbebf8ac079c370a04;p=flatnotes.git Move loadStoredToken call to index.js before the app is mounted --- diff --git a/client/App.vue b/client/App.vue index 285fc87..7319a60 100644 --- a/client/App.vue +++ b/client/App.vue @@ -29,7 +29,6 @@ import { useGlobalStore } from "./globalStore.js"; import { loadTheme } from "./helpers.js"; import NavBar from "./partials/NavBar.vue"; import SearchModal from "./partials/SearchModal.vue"; -import { loadStoredToken } from "./tokenStorage.js"; import LoadingIndicator from "./components/LoadingIndicator.vue"; import router from "./router.js"; @@ -74,8 +73,6 @@ getConfig() loadingIndicator.value.setFailed(); }); -loadStoredToken(); - const showNavBar = computed(() => { return route.name !== "login"; }); diff --git a/client/index.js b/client/index.js index e2672d5..b3a47b0 100644 --- a/client/index.js +++ b/client/index.js @@ -3,6 +3,7 @@ import PrimeVue from "primevue/config"; import ToastService from "primevue/toastservice"; import { createApp } from "vue"; import { createPinia } from "pinia"; +import { loadStoredToken } from "./tokenStorage.js"; import router from "/router.js"; const app = createApp(App); @@ -20,4 +21,6 @@ app.directive("focus", { }, }); +loadStoredToken(); + app.mount("#app");