From 6e93ea140f9e77a5eda572e667eed91a10443b5d Mon Sep 17 00:00:00 2001 From: Hikari Date: Thu, 19 Feb 2026 20:36:42 -0800 Subject: [PATCH] fix: hide all badges when no primary badge is selected Update the badge display logic so that if a user hasn't selected a primary badge, no badges are shown at all (instead of showing all badges). Changes: - Remove else clause from profile badge section (only show badges-section div if primaryBadge is set) - Remove else clause from comment badge display - Update help text from "show all" to "hide all" in settings - Update help text in admin profile edit modal to match - Clarify that badge selection applies to both profile and comments --- .../admin-reports/admin-reports.component.ts | 4 ++-- .../comment-display.component.ts | 14 ------------ .../components/profile/profile.component.ts | 22 ++++--------------- .../components/settings/settings.component.ts | 4 ++-- 4 files changed, 8 insertions(+), 36 deletions(-) diff --git a/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts b/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts index 9edffab..000affc 100644 --- a/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts +++ b/apps/frontend/src/app/components/admin-reports/admin-reports.component.ts @@ -683,7 +683,7 @@ import { ProfileReportWithUsers, CommentReportWithDetails, ReportStatus, ReportR [(ngModel)]="profileEditForm.primaryBadge" class="form-control" > - + @if (editingProfile()?.profile?.badges.isStaff) { } @@ -697,7 +697,7 @@ import { ProfileReportWithUsers, CommentReportWithDetails, ReportStatus, ReportR } - Choose one badge to display on profile, or show all + Choose one badge to display on profile and comments diff --git a/apps/frontend/src/app/components/comment-display/comment-display.component.ts b/apps/frontend/src/app/components/comment-display/comment-display.component.ts index 5008691..781ee5a 100644 --- a/apps/frontend/src/app/components/comment-display/comment-display.component.ts +++ b/apps/frontend/src/app/components/comment-display/comment-display.component.ts @@ -40,20 +40,6 @@ import { ReportModalComponent } from '../report-modal/report-modal.component'; @if (comment.user.primaryBadge === PrimaryBadge.DISCORD && comment.user.inDiscord) { Discord } - } @else { - - @if (comment.user.isStaff) { - Staff - } - @if (comment.user.isMod) { - Mod - } - @if (comment.user.isVip) { - VIP - } - @if (comment.user.inDiscord) { - Discord - } } {{ formatDate(comment.createdAt) }} @if (canEditComment(comment)) { diff --git a/apps/frontend/src/app/components/profile/profile.component.ts b/apps/frontend/src/app/components/profile/profile.component.ts index 3d3eeb5..f51f8f9 100644 --- a/apps/frontend/src/app/components/profile/profile.component.ts +++ b/apps/frontend/src/app/components/profile/profile.component.ts @@ -58,8 +58,8 @@ import { PrimaryBadge } from '@library/shared-types'; } -
- @if (profile()!.primaryBadge) { + @if (profile()!.primaryBadge) { +
@if (profile()!.primaryBadge === PrimaryBadge.STAFF && profile()!.badges.isStaff) { Staff @@ -73,22 +73,8 @@ import { PrimaryBadge } from '@library/shared-types'; @if (profile()!.primaryBadge === PrimaryBadge.DISCORD && profile()!.badges.inDiscord) { Discord Member } - } @else { - - @if (profile()!.badges.isStaff) { - Staff - } - @if (profile()!.badges.isMod) { - Moderator - } - @if (profile()!.badges.isVip) { - VIP - } - @if (profile()!.badges.inDiscord) { - Discord Member - } - } -
+
+ } @if (profile()!.bio) {
diff --git a/apps/frontend/src/app/components/settings/settings.component.ts b/apps/frontend/src/app/components/settings/settings.component.ts index 1f6b490..0acb59b 100644 --- a/apps/frontend/src/app/components/settings/settings.component.ts +++ b/apps/frontend/src/app/components/settings/settings.component.ts @@ -77,7 +77,7 @@ import { User, PrimaryBadge } from '@library/shared-types'; name="primaryBadge" [(ngModel)]="formData.primaryBadge" > - + @if (user()!.isStaff) { } @@ -91,7 +91,7 @@ import { User, PrimaryBadge } from '@library/shared-types'; } - Choose one badge to display on your profile, or show all + Choose one badge to display on your profile and comments