From 6135bbd834d4626a807b2d02a0a3ddea2364ebeb Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Tue, 17 Feb 2026 18:58:13 +0000 Subject: [PATCH] Restore breadcrumb changes done a while back, lost in some edits. --- frontend/auth/admin/AdminApp.vue | 14 +++++++++++--- frontend/src/components/ProfileView.vue | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/frontend/auth/admin/AdminApp.vue b/frontend/auth/admin/AdminApp.vue index 97abff4..2582983 100644 --- a/frontend/auth/admin/AdminApp.vue +++ b/frontend/auth/admin/AdminApp.vue @@ -557,16 +557,24 @@ const pageHeading = computed(() => { // Breadcrumb entries for admin app. const breadcrumbEntries = computed(() => { const entries = [ - { label: 'Auth', href: makeUiHref() }, - { label: 'Admin', href: adminUiPath() } + { label: 'My Profile', href: makeUiHref() } ] + // For org admins, combine Admin and their org + if (isOrgAdmin.value && !isMasterAdmin.value && orgs.value.length > 0) { + const org = orgs.value[0] + entries.push({ label: `Admin: ${org.display_name}`, href: `#org/${org.uuid}` }) + } else { + entries.push({ label: 'Admin', href: adminUiPath() }) + } // Determine organization for user view if selectedOrg not explicitly chosen. let orgForUser = null if (selectedUser.value) { orgForUser = orgs.value.find(o => o.uuid === selectedUser.value.org) || null } const orgToShow = selectedOrg.value || orgForUser - if (orgToShow) { + // Add org breadcrumb only if it's not already included in the Admin entry + const adminOrg = (isOrgAdmin.value && !isMasterAdmin.value && orgs.value.length > 0) ? orgs.value[0] : null + if (orgToShow && (!adminOrg || orgToShow.uuid !== adminOrg.uuid)) { entries.push({ label: orgToShow.display_name, href: `#org/${orgToShow.uuid}` }) } if (currentOidcId.value) { diff --git a/frontend/src/components/ProfileView.vue b/frontend/src/components/ProfileView.vue index cf464b7..13a57d4 100644 --- a/frontend/src/components/ProfileView.vue +++ b/frontend/src/components/ProfileView.vue @@ -385,7 +385,7 @@ const useWideLayout = computed(() => { return hasLargeSessionGroup || hasManyCredentials }) -const breadcrumbEntries = computed(() => { const entries = [{ label: 'Auth', href: makeUiHref() }]; if (isAdmin.value) entries.push({ label: 'Admin', href: adminUiPath() }); return entries }) +const breadcrumbEntries = computed(() => { const entries = [{ label: 'My Profile', href: makeUiHref() }]; if (isAdmin.value) entries.push({ label: 'Admin', href: adminUiPath() }); return entries }) const saveProfile = async () => { const name = editName.value.trim()