From 42240dd2c75e5e1eb70e71caa09e9fed9a28d82d Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Thu, 17 Sep 2026 19:17:00 +0000 Subject: [PATCH] Unify host profile view as framed dialog, add profile iframe mode HostProfileView now renders the same centered frame card as the login flows, whether shown full-page at /auth/ (host mode) or inside the new #mode=profile restricted iframe. The component self-fetches its data when the parent does not provide it, and emits back/logout so each context reacts appropriately: the full page reloads, the iframe posts auth-back / auth-logout to the host. --- frontend/auth/App.vue | 16 +- frontend/auth/restricted/RestrictedApi.vue | 17 +- frontend/src/components/HostProfileView.vue | 233 +++++++++++++------- 3 files changed, 185 insertions(+), 81 deletions(-) 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 @@