diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 32efa13..c79cfae 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -2,7 +2,7 @@ import { toast } from 'vue3-toastify'; import { ref } from 'vue' import i18n, { setLang } from './i18n.js' - import { isLogged } from '@/rest/Users.js' + import { isLogged, getSelf } from '@/rest/Users.js' import { notifications, fetchNotifications, archiveNotification } from '@/rest/notifications.js' import { appList, currentView } from '@/rest/apps.js' @@ -14,9 +14,11 @@ window.onhashchange = function() { currentURL = window.location.hash; } const Logged = ref(isLogged()); +const user = ref(); if(Logged.value){ fetchNotifications(); + getSelf().then(e => user.value = e); } window.addEventListener('hashchange', () => { @@ -49,7 +51,7 @@ window.addEventListener('hashchange', () => {