unify verified indicator styling

Add a shared verified badge that uses the same icon and success colours as the dashboard statistic cards, and use it for verified staff in the orgminer list and detail panel.
This commit is contained in:
2026-11-11 21:29:42 +01:00
parent 159f121d7f
commit 9e5276fcea
6 changed files with 95 additions and 18 deletions
@@ -7,8 +7,8 @@
<div class="orgminer-state">
<mat-icon>search_off</mat-icon>
<span
>Für {{ orgName() || 'diese Organisation' }} wurden keine
Orgminer-Inhalte gefunden.</span
>Für {{ orgName() || 'diese Organisation' }} wurden keine Orgminer-Inhalte
gefunden.</span
>
</div>
} @else {
@@ -41,7 +41,9 @@
<mat-icon>{{ PERSONS_ICON }}</mat-icon>
<span class="cat-label">Personal</span>
<span class="cat-count">{{ categoryCount('staff') }}</span>
<span class="chevron" [class.open]="expandedCategory() === 'staff'"
<span
class="chevron"
[class.open]="expandedCategory() === 'staff'"
>▾</span
>
</button>
@@ -56,11 +58,8 @@
(click)="selectItem('staff', person)">
{{ person.name }}
@if (isVerified(person.name)) {
<mat-icon
class="verified-badge"
matTooltip="Verified Staff Member"
>verified</mat-icon
>
<app-verified-badge
tooltip="Verifiziertes Personal" />
}
</li>
@@ -79,7 +78,9 @@
<mat-icon>{{ PROJECT_ICON }}</mat-icon>
<span class="cat-label">Projekte</span>
<span class="cat-count">{{ categoryCount('projects') }}</span>
<span class="chevron" [class.open]="expandedCategory() === 'projects'"
<span
class="chevron"
[class.open]="expandedCategory() === 'projects'"
>▾</span
>
</button>
@@ -139,7 +140,14 @@
<!-- ---------------------------- STAFF DETAIL ---------------------------- -->
@if (selectedStaff(); as staff) {
<div class="detail-card">
<h2 class="detail-title">{{ staff.name }}</h2>
<div class="detail-title-row">
<h2 class="detail-title">{{ staff.name }}</h2>
@if (isVerified(staff.name)) {
<app-verified-badge
size="md"
tooltip="Verifiziertes Personal" />
}
</div>
<div class="detail-fields">
@if (staff.email) {
@@ -163,7 +171,9 @@
<span class="detail-label">Links</span>
<div class="detail-links">
@for (link of staff.links; track link) {
<a [href]="link" target="_blank" rel="noopener">{{ link }}</a>
<a [href]="link" target="_blank" rel="noopener">{{
link
}}</a>
}
</div>
</div>
@@ -214,7 +224,9 @@
<span class="detail-label">Links</span>
<div class="detail-links">
@for (link of project.links; track $index) {
<a [href]="link" target="_blank" rel="noopener">{{ link }}</a>
<a [href]="link" target="_blank" rel="noopener">{{
link
}}</a>
}
</div>
</div>
@@ -247,7 +259,9 @@
<span class="detail-label">Links</span>
<div class="detail-links">
@for (link of news.links; track link) {
<a [href]="link" target="_blank" rel="noopener">{{ link }}</a>
<a [href]="link" target="_blank" rel="noopener">{{
link
}}</a>
}
</div>
</div>
@@ -153,9 +153,6 @@
font-weight: 600;
}
}
.verified-badge {
color: var(--sg-blue-highlight);
}
/* ============================ DETAIL PANEL ============================ */
.orgminer-detail {
@@ -27,7 +27,7 @@ import {
PROJECT_ICON,
NEWS_ICON,
} from '../../../shared/ui/icons';
import { MatTooltip } from '@angular/material/tooltip';
import { VerifiedBadgeComponent } from '../../../shared/ui/verified-badge/verified-badge.component';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { OrgminerService } from '../../../api/api/orgminer.service';
/* ------------------------------ Data model ------------------------------ */
@@ -50,7 +50,7 @@ interface Selection {
KeywordWordcloudComponent,
MatIconModule,
ChipComponent,
MatTooltip,
VerifiedBadgeComponent,
MatProgressSpinnerModule,
],
templateUrl: './orgminer-content.component.html',
@@ -0,0 +1,7 @@
<span
class="verified-badge"
[class.verified-badge--md]="size() === 'md'"
[matTooltip]="tooltip()"
matTooltipPosition="above">
<mat-icon>{{ VERIFIED_ICON }}</mat-icon>
</span>
@@ -0,0 +1,34 @@
:host {
display: inline-flex;
flex: none;
}
.verified-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--sg-success-soft);
color: var(--sg-success);
cursor: help;
mat-icon {
width: 15px;
height: 15px;
color: inherit;
font-size: 15px;
}
&--md {
width: 24px;
height: 24px;
mat-icon {
width: 18px;
height: 18px;
font-size: 18px;
}
}
}
@@ -0,0 +1,25 @@
import { Component, input } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { MatTooltipModule } from '@angular/material/tooltip';
import { VERIFIED_ICON } from '../icons';
/**
* Small success-coloured verification seal.
*
* Matches the icon treatment of the dashboard statistic cards: same `verified`
* glyph, same `--sg-success-soft` / `--sg-success` colour pair.
*/
@Component({
selector: 'app-verified-badge',
standalone: true,
imports: [MatIconModule, MatTooltipModule],
templateUrl: './verified-badge.component.html',
styleUrl: './verified-badge.component.scss',
})
export class VerifiedBadgeComponent {
readonly VERIFIED_ICON = VERIFIED_ICON;
readonly tooltip = input('Verifiziertes Profil');
readonly size = input<'sm' | 'md'>('sm');
}