Add simple whiteboard

This commit is contained in:
2026-03-12 14:49:41 +01:00
parent d9bc14650d
commit 878157efc0
9 changed files with 398 additions and 2 deletions

View File

@@ -22,7 +22,9 @@ type MessageHandlerDeps = {
itemPropertyKeys: string[];
itemPropertyIndex: number;
carriedItemId: string | null;
whiteboardItemId: string | null;
};
refreshWhiteboardStatus: () => void;
dom: {
connectButton: HTMLElement;
disconnectButton: HTMLElement;
@@ -258,6 +260,12 @@ export function createOnMessageHandler(deps: MessageHandlerDeps): (message: Inco
deps.updateStatus(`${deps.itemPropertyLabel(key)}: ${deps.getItemPropertyValue(message.item, key)}`);
}
}
if (
deps.state.whiteboardItemId === message.item.id &&
(deps.state.mode === 'whiteboardLines' || deps.state.mode === 'whiteboardLineActions')
) {
deps.refreshWhiteboardStatus();
}
await deps.refreshAudioSubscriptions(true);
break;
}