From 7f27b5e823359a2d8aa1a86c8e16c39d34ab2820 Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Tue, 11 Aug 2026 23:25:44 -0400 Subject: [PATCH] style(dashboard): polish quick stats and recent events feed - Emphasize stat values and keep labels on one line - Rework the recent events feed into a two-line layout with human-readable type labels and narrative highlighting --- .../frontend/dashboard/QuickStats.tsx | 32 ++++++---- .../frontend/dashboard/RecentEvents.tsx | 58 +++++++++++-------- 2 files changed, 56 insertions(+), 34 deletions(-) diff --git a/src/components/frontend/dashboard/QuickStats.tsx b/src/components/frontend/dashboard/QuickStats.tsx index e462ad8..15c60cc 100644 --- a/src/components/frontend/dashboard/QuickStats.tsx +++ b/src/components/frontend/dashboard/QuickStats.tsx @@ -28,14 +28,16 @@ export function QuickStats({ totalMembers, }: QuickStatsProps) { return ( -
+
- Active Campaigns - {activeCampaigns} + Active Campaigns + + {activeCampaigns} + @@ -43,8 +45,10 @@ export function QuickStats({ - Total Missions - {totalMissions} + Total Missions + + {totalMissions} + @@ -52,8 +56,10 @@ export function QuickStats({ - Structures - {totalStructures} + Structures + + {totalStructures} + @@ -61,8 +67,10 @@ export function QuickStats({ - Factions - {totalFactions} + Factions + + {totalFactions} + @@ -70,8 +78,10 @@ export function QuickStats({ - Operators - {totalMembers} + Operators + + {totalMembers} +
diff --git a/src/components/frontend/dashboard/RecentEvents.tsx b/src/components/frontend/dashboard/RecentEvents.tsx index d9dffdb..3aa0c7a 100644 --- a/src/components/frontend/dashboard/RecentEvents.tsx +++ b/src/components/frontend/dashboard/RecentEvents.tsx @@ -6,7 +6,8 @@ import { ItemHeader, ItemTitle, } from "@/components/ui/item"; -import { ScrollTextIcon } from "lucide-react"; +import { BookOpenTextIcon, ScrollTextIcon } from "lucide-react"; +import { formatType } from "@/utils/event-log/formatType"; interface EventEntry { id: number; @@ -64,36 +65,47 @@ export function RecentEvents({ events, currentUserId }: RecentEventsProps) {
-
- {events.map((event) => { +
+ {events.map((event, index) => { const actor = typeof event.actor === "object" && event.actor !== null ? (event.actor as User) : null; + const actorId = + actor?.id ?? + (typeof event.actor === "number" ? event.actor : null); + const isYou = actorId != null && actorId === currentUserId; const actorName = - actor?.id === currentUserId - ? "You" - : actor?.displayName ?? actor?.username ?? null; + actor?.displayName ?? actor?.username ?? null; + const actorLabel = isYou ? "You" : actorName; + const isNarrative = event.system === false; return ( -
- - {timeAgo(event.timestamp)} - -
-

- {actorName && ( - {actorName} - )} - {event.message} -

- - {event.type} - +
+
+ {isNarrative && ( + + )} +
+
+ + {timeAgo(event.timestamp)} + + {actorLabel && ( + + {actorLabel} + + )} + {formatType(event.type)} +
+ + {event.message} + +
+ {index < events.length - 1 &&
}
); })}