feat: implement role-based access control

Introduce 'gm', 'player', and 'observer' roles to the journal system.
This includes:
- Restricting command usage and completions to the GM role.
- Implementing role-based message emission permissions.
- Adding a player list and role indicators in the UI.
- Persisting the user's role in localStorage.
- Updating the connection logic to include the role in the client ID.
This commit is contained in:
2026-07-06 17:52:56 +08:00
parent e216b94e25
commit 59236f6dba
8 changed files with 269 additions and 150 deletions
+1 -5
View File
@@ -5,11 +5,7 @@
import { Component, Show, createMemo } from "solid-js";
import type { StreamMessage as StreamMessageType } from "./registry";
import { getMessageType } from "./registry";
import {
revertLatest,
canRevert,
useJournalStream,
} from "../stores/journalStream";
import { revertLatest, useJournalStream } from "../stores/journalStream";
export const StreamMessageCard: Component<{
message: StreamMessageType;