Enable full mode with multiple rooms

This commit is contained in:
dtonon 2026-05-19 13:15:36 +01:00
parent a8b7eaf20e
commit f6bea700f0
24 changed files with 767 additions and 286 deletions

17
src/lib/active.svelte.ts Normal file
View file

@ -0,0 +1,17 @@
import { GROUP_ID, MODE } from "$lib/config";
// The group the user is currently acting within (posting, chatting, joining).
// Simple mode has exactly one group; full mode follows the room or thread being
// viewed. GROUP_ID is never assumed in full mode — this is the single source of
// truth for "which group".
let current = $state<string>(MODE === "full" ? "" : GROUP_ID);
export const activeGroup = {
get id() {
return current;
},
};
export function setActiveGroup(id: string) {
if (id) current = id;
}