diff --git a/css/tailwind.source.css b/css/tailwind.source.css index 4f34dda1..eae3d05f 100644 --- a/css/tailwind.source.css +++ b/css/tailwind.source.css @@ -280,6 +280,16 @@ left: var(--space-2xs); } + /* Gold ring around the avatar when the logged-in user is an admin — the + unmistakable "you're an admin" signal on your own profile button. A thin + page-colored gap separates the avatar from the ring so it reads as a ring, + not a border. Box-shadow isn't clipped by the avatar's own overflow. */ + #profileButton.is-admin > div { + box-shadow: + 0 0 0 var(--border-width-hairline) var(--color-page), + 0 0 0 calc(var(--border-width-hairline) * 3) var(--status-warning); + } + .header-icon-toggle[data-theme-state="light"]:hover, .header-icon-toggle[data-theme-state="light"]:focus-visible { color: var(--color-text); diff --git a/js/app/uiCoordinator.js b/js/app/uiCoordinator.js index ed3923f6..a743ed2f 100644 --- a/js/app/uiCoordinator.js +++ b/js/app/uiCoordinator.js @@ -128,6 +128,12 @@ export function createUiCoordinator(deps) { if (exploreLink) { exploreLink.classList.remove("hidden"); } + + // Light the admin star/ring whenever the authenticated UI is applied — + // this covers session restore, not just a fresh login. + if (typeof this.refreshAdminStar === "function") { + this.refreshAdminStar(); + } }, applyLoggedOutUiState() { diff --git a/js/ui/applicationBootstrap.js b/js/ui/applicationBootstrap.js index 7ab731a7..c3b05a67 100644 --- a/js/ui/applicationBootstrap.js +++ b/js/ui/applicationBootstrap.js @@ -987,7 +987,13 @@ export default class ApplicationBootstrap { typeof app.getCurrentUserNpub === "function" ? app.getCurrentUserNpub() : ""; - applyAdminStar(app.profileButton, npub || ""); + // applyAdminStar returns whether the user is an admin; use it to also + // toggle the gold ring around the profile avatar (the flagship signal + // on your own button — the corner star stays the shared marker). + const isAdmin = applyAdminStar(app.profileButton, npub || ""); + if (app.profileButton && app.profileButton.classList) { + app.profileButton.classList.toggle("is-admin", Boolean(isAdmin)); + } } catch (error) { devLogger.warn("[Application] Failed to refresh admin star", error); }