feat(frontend): expose owned session scopes
This commit is contained in:
@@ -10,6 +10,7 @@ interface Props {
|
||||
menuFor: (session: SessionSummary) => ReactNode;
|
||||
selectedIds?: ReadonlySet<string>;
|
||||
onSelectionChange?: (id: string, selected: boolean) => void;
|
||||
showOwner?: boolean;
|
||||
}
|
||||
|
||||
function statusIndicator(status: string) {
|
||||
@@ -21,7 +22,7 @@ function statusIndicator(status: string) {
|
||||
|
||||
export function NavSessions({
|
||||
sessions, activeSessionId, onOpenPanel, menuFor,
|
||||
selectedIds = new Set<string>(), onSelectionChange = () => undefined,
|
||||
selectedIds = new Set<string>(), onSelectionChange = () => undefined, showOwner = false,
|
||||
}: Props) {
|
||||
if (sessions.length === 0) {
|
||||
return (
|
||||
@@ -70,13 +71,20 @@ export function NavSessions({
|
||||
title={indicator.label}
|
||||
className={["size-1.5 shrink-0 rounded-full", indicator.color].join(" ")}
|
||||
/>
|
||||
<span
|
||||
className={[
|
||||
"min-w-0 flex-1 truncate text-[0.8rem] leading-snug",
|
||||
active ? "font-semibold text-foreground" : "font-medium text-foreground/90",
|
||||
].join(" ")}
|
||||
>
|
||||
{label}
|
||||
<span className="min-w-0 flex-1">
|
||||
<span
|
||||
className={[
|
||||
"block truncate text-[0.8rem] leading-snug",
|
||||
active ? "font-semibold text-foreground" : "font-medium text-foreground/90",
|
||||
].join(" ")}
|
||||
>
|
||||
{label}
|
||||
</span>
|
||||
{showOwner && (
|
||||
<span className="block truncate text-[0.65rem] text-muted-foreground">
|
||||
Owner: {s.author ?? "Unknown"}
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
{menuFor(s)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user