mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 04:42:57 +00:00
Profile button: gold admin ring + fire on session restore
Make the super-admin/admin signal unmistakable on your own profile button: a gold ring around the avatar (with a thin page-colored gap so it reads as a ring, not a border) in addition to the corner star. - applicationBootstrap.js: refreshAdminStar toggles an is-admin class on the profile button using applyAdminStar's return value. - CSS: #profileButton.is-admin > div draws the gold ring (box-shadow, not clipped by the avatar's overflow). - uiCoordinator.js: refresh the admin star/ring inside applyAuthenticatedUiState so it also lights on session restore, not only a fresh login — the likely reason it wasn't showing. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
60157eb743
commit
fdddbc2bb4
3 files changed
+23
-1
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user