From 2231cc86ee616522f2d5faf417bbceb0b82a1e4f Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Wed, 7 Oct 2026 13:07:23 -0400 Subject: [PATCH] feat(dashboard): flag restricted events with a lock icon in Recent Events --- src/app/(frontend)/page.tsx | 1 + src/components/frontend/dashboard/RecentEvents.tsx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/(frontend)/page.tsx b/src/app/(frontend)/page.tsx index 1f2b0432..83801312 100644 --- a/src/app/(frontend)/page.tsx +++ b/src/app/(frontend)/page.tsx @@ -180,6 +180,7 @@ export default async function HomePage() { system: e.system ?? true, actor: e.actor as number | User | null | undefined, structure: e.structure as number | GameStructure | null | undefined, + visibility: (e.visibility as "public" | "restricted" | null) ?? "public", })); // Fetch active campaigns for the sidebar diff --git a/src/components/frontend/dashboard/RecentEvents.tsx b/src/components/frontend/dashboard/RecentEvents.tsx index 0ce24087..87497931 100644 --- a/src/components/frontend/dashboard/RecentEvents.tsx +++ b/src/components/frontend/dashboard/RecentEvents.tsx @@ -1,6 +1,6 @@ import type { GameStructure, User } from "@/payload-types"; import { Item, ItemContent, ItemHeader, ItemTitle } from "@/components/ui/item"; -import { BookOpenTextIcon, ScrollTextIcon } from "lucide-react"; +import { BookOpenTextIcon, LockIcon, ScrollTextIcon } from "lucide-react"; import { formatType } from "@/utils/event-log/formatType"; interface EventEntry { @@ -11,6 +11,7 @@ interface EventEntry { system: boolean; actor?: number | User | null; structure?: number | GameStructure | null; + visibility?: "public" | "restricted" | null; } interface RecentEventsProps { @@ -86,6 +87,9 @@ export function RecentEvents({ events, currentUserId }: RecentEventsProps) { )} {formatType(event.type)} + {event.visibility === "restricted" && ( + + )} {event.message}