feat(journal): delete sessions from the ui

Add a confirmation dialog that spells out the removal is irreversible, and expose delete from the GM session dropdown and the lobby session list.
This commit is contained in:
2026-09-13 13:36:42 +08:00
parent a65ca2ab93
commit 421af125bb
6 changed files with 176 additions and 22 deletions
+5 -1
View File
@@ -8,6 +8,7 @@ import { SessionDropdown } from "./SessionDropdown";
interface JournalHeaderProps {
onClose: () => void;
onCreateSession: () => void;
onDeleteSession: (id: string, name: string) => void;
}
export const JournalHeader: Component<JournalHeaderProps> = (props) => {
@@ -54,7 +55,10 @@ export const JournalHeader: Component<JournalHeaderProps> = (props) => {
</p>
{/* Clickable subtitle — session dropdown (GM only) */}
<Show when={stream.myRole === "gm"}>
<SessionDropdown onCreate={props.onCreateSession} />
<SessionDropdown
onCreate={props.onCreateSession}
onDelete={props.onDeleteSession}
/>
</Show>
</div>
</Show>