From cebaa2a75740c518022b29e472ada8c359387c74 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 11 Feb 2026 01:24:15 +0000 Subject: [PATCH] Less eagerly enable very wide layout for user profile (only if more than 8 items for passkeys or per site sessions). --- frontend/src/components/ProfileView.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ProfileView.vue b/frontend/src/components/ProfileView.vue index d1ba5ee..5ccd93f 100644 --- a/frontend/src/components/ProfileView.vue +++ b/frontend/src/components/ProfileView.vue @@ -337,7 +337,21 @@ const isAdmin = computed(() => { }) const hasMultipleSessions = computed(() => sessions.value.length > 1) const credentials = computed(() => authStore.userInfo?.credentials || []) -const useWideLayout = computed(() => sessions.value.length > 4 || credentials.value.length > 4) +const useWideLayout = computed(() => { + // Check if any single site has more than 8 sessions + const groups = {} + for (const session of sessions.value) { + const host = session.host || '' + if (!groups[host]) groups[host] = [] + groups[host].push(session) + } + const hasLargeSessionGroup = Object.values(groups).some(group => group.length > 8) + + // Check if passkeys exceed 8 + const hasManyCredentials = credentials.value.length > 8 + + return hasLargeSessionGroup || hasManyCredentials +}) const breadcrumbEntries = computed(() => { const entries = [{ label: 'Auth', href: makeUiHref() }]; if (isAdmin.value) entries.push({ label: 'Admin', href: adminUiPath() }); return entries }) const saveName = async () => {