1
0
Fork 0

feat(dashboard): flag restricted events with a lock icon in Recent Events

This commit is contained in:
Jason Fraley 2026-10-07 13:07:23 -04:00
parent 03c8794026
commit 2231cc86ee
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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) {
</span>
)}
<span className="capitalize">{formatType(event.type)}</span>
{event.visibility === "restricted" && (
<LockIcon className="size-3 text-amber-400 shrink-0" />
)}
</div>
<span className={`min-w-0 ${isNarrative ? "text-amber-100/90" : ""}`}>
{event.message}