diff --git a/frontend/auth/App.vue b/frontend/auth/App.vue index 12a696c..cb6ca9a 100644 --- a/frontend/auth/App.vue +++ b/frontend/auth/App.vue @@ -2,7 +2,14 @@
- + @@ -15,6 +22,7 @@ import { computed, onMounted, onUnmounted, ref } from 'vue' import { useAuthStore } from '@/stores/auth' import { apiJson, SessionValidator, settings as paskiaSettings } from 'paskia' import { updateThemeFromSession } from '@/utils/theme' +import { goBack } from '@/utils/helpers' import StatusMessage from '@/components/StatusMessage.vue' import ProfileView from '@/components/ProfileView.vue' import HostProfileView from '@/components/HostProfileView.vue' @@ -48,6 +56,12 @@ const isHostMode = computed(() => { return currentHost !== configuredHost }) +// HostProfileView already posted /auth/api/logout; clear local state and reload. +function onHostLogout() { + sessionStorage.clear() + window.location.reload() +} + function onSessionLost(e) { store.userInfo = null store.ctx = null diff --git a/frontend/auth/restricted/RestrictedApi.vue b/frontend/auth/restricted/RestrictedApi.vue index 3fb1b4d..2b26e21 100644 --- a/frontend/auth/restricted/RestrictedApi.vue +++ b/frontend/auth/restricted/RestrictedApi.vue @@ -1,5 +1,11 @@