Sync whiteboard images and add board ownership
CI / server (push) Successful in 33s
CI / frontend (push) Successful in 28s
CI / kiosk (push) Failing after 7m17s
Build and Publish Docker Images / build-and-push (apps/web-client/Dockerfile, pistation-web) (push) Successful in 2m17s
Build and Publish Docker Images / build-and-push (server/Dockerfile, pistation-server) (push) Successful in 2m32s

This commit is contained in:
2026-08-09 21:06:31 -04:00
parent 07508504ac
commit 404a35e1b1
13 changed files with 355 additions and 14 deletions
+14 -1
View File
@@ -2,12 +2,14 @@ import type {
DataEnvelope,
KioskLayout,
RoomMode,
WhiteboardElement
WhiteboardElement,
WhiteboardFile
} from "@pistation/shared-types";
import {
isNightModeActive,
isTopic,
mergeWhiteboardElements,
mergeWhiteboardFiles,
PIN_GRACE_SECONDS
} from "@pistation/shared-types";
import type { ConnectionStatus } from "@pistation/client-core";
@@ -52,6 +54,7 @@ export class KioskController {
mode = $state<RoomMode>("idle");
annotations = $state<AnnotationState>(createAnnotationState());
whiteboardElements = $state<WhiteboardElement[]>([]);
whiteboardFiles = $state<WhiteboardFile[]>([]);
participants = $state<RoomParticipant[]>([]);
isScreenActive = $state(false);
screenWidth = $state(0);
@@ -61,6 +64,13 @@ export class KioskController {
isNight = $state(false);
connectionError = $state<string | null>(null);
get resolvedWhiteboardFiles(): WhiteboardFile[] {
return this.whiteboardFiles.map((file) => ({
...file,
url: file.url.startsWith("http") ? file.url : `${this.mediaBaseUrl}${file.url}`
}));
}
private config: KioskConfig | null = null;
private connection: NativeRoom | null = null;
private timers: ReturnType<typeof setInterval>[] = [];
@@ -281,12 +291,15 @@ export class KioskController {
const event = envelope.payload;
if (event.type === "whiteboard.patch") {
this.whiteboardElements = mergeWhiteboardElements(this.whiteboardElements, event.elements);
this.whiteboardFiles = mergeWhiteboardFiles(this.whiteboardFiles, event.files ?? []);
}
if (event.type === "whiteboard.snapshot") {
this.whiteboardElements = event.elements;
this.whiteboardFiles = mergeWhiteboardFiles(this.whiteboardFiles, event.files ?? []);
}
if (event.type === "whiteboard.clear") {
this.whiteboardElements = [];
this.whiteboardFiles = [];
}
}
}
+5 -1
View File
@@ -61,7 +61,11 @@
</p>
</div>
{:else if kiosk.mode === "whiteboard"}
<WhiteboardCanvas elements={kiosk.whiteboardElements} readOnly={true} />
<WhiteboardCanvas
elements={kiosk.whiteboardElements}
files={kiosk.resolvedWhiteboardFiles}
readOnly={true}
/>
{:else if isPresenting}
<AnnotationOverlay annotations={kiosk.annotations} labels={participantLabels} />
{:else if kiosk.layout && kiosk.isNight}