fix(icons): migrate admin dashboard to Lucide
Replace every PrimeIcons pi-* class (static and data-driven) in the admin dashboard area with app-icon: dashboard-card, dashboard-shortcut- card, dashboard-status-row, dashboard-timeline, and the icon data in admin-dashboard.facade.ts / admin-dashboard-page.component.ts. Icon fields on AdminDashboardQuickAction/Shortcut/DashboardTimelineEntry are now typed AppIconName instead of string, so a typo or unmapped icon name is a compile error instead of a silently blank icon. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,19 +11,21 @@ import { DashboardStatusRowComponent } from '../components/dashboard-status-row.
|
||||
import { DashboardShortcutCardComponent } from '../components/dashboard-shortcut-card.component';
|
||||
import { DashboardTimelineComponent, DashboardTimelineEntry, DashboardTimelineStatus } from '../components/dashboard-timeline.component';
|
||||
import { ButtonComponent } from '../../../../shared/ui/button/button.component';
|
||||
import { IconComponent } from '../../../../shared/ui/icon/icon.component';
|
||||
import { AdminDashboardQuickAction, AdminDashboardShortcut } from '../models/admin-dashboard.model';
|
||||
import { AppIconName } from '../../../../shared/ui/icon/icon-registry';
|
||||
|
||||
interface LinkedAction {
|
||||
icon: string;
|
||||
icon: AppIconName;
|
||||
labelKey: string;
|
||||
descriptionKey?: string;
|
||||
route: string[];
|
||||
comingSoon: boolean;
|
||||
}
|
||||
|
||||
const ACTIVITY_ICON: Record<string, string> = {
|
||||
'draft-saved': 'pi-save',
|
||||
published: 'pi-upload',
|
||||
const ACTIVITY_ICON: Record<string, AppIconName> = {
|
||||
'draft-saved': 'save',
|
||||
published: 'upload',
|
||||
};
|
||||
|
||||
const ACTIVITY_LABEL_KEY: Record<string, string> = {
|
||||
@@ -31,11 +33,11 @@ const ACTIVITY_LABEL_KEY: Record<string, string> = {
|
||||
published: 'dashboard.activityPublished',
|
||||
};
|
||||
|
||||
const DOCUMENTATION_LINKS = [
|
||||
{ id: 'documentation', icon: 'pi-book', labelKey: 'dashboard.docDocumentation' },
|
||||
{ id: 'shortcuts', icon: 'pi-bolt', labelKey: 'dashboard.docKeyboardShortcuts' },
|
||||
{ id: 'report-issue', icon: 'pi-flag', labelKey: 'dashboard.docReportIssue' },
|
||||
{ id: 'release-notes', icon: 'pi-megaphone', labelKey: 'dashboard.docReleaseNotes' },
|
||||
const DOCUMENTATION_LINKS: Array<{ id: string; icon: AppIconName; labelKey: string }> = [
|
||||
{ id: 'documentation', icon: 'book', labelKey: 'dashboard.docDocumentation' },
|
||||
{ id: 'shortcuts', icon: 'zap', labelKey: 'dashboard.docKeyboardShortcuts' },
|
||||
{ id: 'report-issue', icon: 'flag', labelKey: 'dashboard.docReportIssue' },
|
||||
{ id: 'release-notes', icon: 'megaphone', labelKey: 'dashboard.docReleaseNotes' },
|
||||
];
|
||||
|
||||
@Component({
|
||||
@@ -51,6 +53,7 @@ const DOCUMENTATION_LINKS = [
|
||||
DashboardShortcutCardComponent,
|
||||
DashboardTimelineComponent,
|
||||
ButtonComponent,
|
||||
IconComponent,
|
||||
],
|
||||
templateUrl: './admin-dashboard-page.component.html',
|
||||
styleUrls: ['./admin-dashboard-page.component.scss'],
|
||||
@@ -98,7 +101,7 @@ export class AdminDashboardPageComponent {
|
||||
id: entry.id,
|
||||
labelKey: ACTIVITY_LABEL_KEY[entry.type] ?? entry.type,
|
||||
timeText: new Date(entry.timestamp).toLocaleString(this.languageService.currentLanguage()),
|
||||
icon: ACTIVITY_ICON[entry.type] ?? 'pi-circle',
|
||||
icon: ACTIVITY_ICON[entry.type] ?? 'circle',
|
||||
})),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user