mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Admin ring on comments/channel + pending-submissions dots on Admin tab & Submissions subtab
- adminBadge.js: add applyAdminRing(el, id) for surfaces that already place the star on a specific element and just need the ring. - comments: ring + star on admin authors' avatars; round the comment avatar box so the ring reads as a circle. - channel page: ring the inner rounded avatar box (star already on the wrap). - Notification dots: red dot on the profile modal's Admin nav tab and on the Submissions subtab button when there are pending submissions, so admins know where to look. profileModalController.setSubmissionsUnreadIndicator toggles both (Admin nav dot gated on the tab being visible); driven from applyProfileNotificationDot off app._submissionsPending. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
37edbd18d2
commit
d091ce8bac
7 files changed
+100
-7
No files matched your search
@@ -721,6 +721,12 @@ export class ProfileModalController {
|
||||
this.navButtons.admin = document.getElementById("profileNavAdmin") || null;
|
||||
this.navButtons.safety = document.getElementById("profileNavSafety") || null;
|
||||
|
||||
// Pending-submissions dots: on the Admin nav tab and the Submissions subtab.
|
||||
this.adminNavUnreadDot =
|
||||
document.getElementById("profileNavAdminUnreadDot") || null;
|
||||
this.adminSubmissionsDot =
|
||||
document.getElementById("adminSubtabSubmissionsDot") || null;
|
||||
|
||||
this.profileEditBtn = document.getElementById("profileEditBtn") || null;
|
||||
this.profileEditBackBtn = document.getElementById("profileEditBackBtn") || null;
|
||||
|
||||
@@ -1353,6 +1359,26 @@ export class ProfileModalController {
|
||||
);
|
||||
}
|
||||
|
||||
// Pending-submissions dots for admins: on the Admin nav tab (gated on that tab
|
||||
// being visible) and on the Submissions subtab button inside the admin pane.
|
||||
setSubmissionsUnreadIndicator(visible) {
|
||||
const show = Boolean(visible);
|
||||
const adminButton = this.navButtons.admin;
|
||||
const adminNavVisible =
|
||||
adminButton instanceof HTMLElement &&
|
||||
!adminButton.classList.contains("hidden") &&
|
||||
!adminButton.hasAttribute("hidden");
|
||||
if (this.adminNavUnreadDot instanceof HTMLElement) {
|
||||
this.adminNavUnreadDot.classList.toggle(
|
||||
"is-visible",
|
||||
show && adminNavVisible,
|
||||
);
|
||||
}
|
||||
if (this.adminSubmissionsDot instanceof HTMLElement) {
|
||||
this.adminSubmissionsDot.classList.toggle("is-visible", show);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user