Add onboarding weather and template gradients
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile, web, pulse-signage-web) (push) Successful in 1m53s
Publish Docker Image / build-and-push-existing-registry (./build/Dockerfile.player, player, pulse-signage-player) (push) Successful in 34s

This commit is contained in:
2026-08-28 20:05:23 +01:00
parent aa07a78912
commit 3960931ebe
80 changed files with 12750 additions and 519 deletions
+22 -1
View File
@@ -32,6 +32,21 @@ function createPlayerRuntime(options) {
const announcementListenersBySlug = new Map();
const wss = new WebSocketServer({ noServer: true });
function hasActiveClientId(clientId, currentConnection) {
const normalizedClientId = String(clientId || '').trim();
if (!normalizedClientId) {
return false;
}
for (const connections of connectionsBySlug.values()) {
for (const connection of connections.values()) {
if (connection !== currentConnection && String(connection.clientId || '').trim() === normalizedClientId) {
return true;
}
}
}
return false;
}
function normalizeClientIp(value) {
const ip = String(value || '').trim();
if (!ip) {
@@ -534,7 +549,13 @@ function createPlayerRuntime(options) {
return;
}
connection.clientId = payload.clientId ? String(payload.clientId).trim() : connection.clientId;
const nextClientId = payload.clientId ? String(payload.clientId).trim() : connection.clientId;
if (nextClientId && hasActiveClientId(nextClientId, connection)) {
socket.send(JSON.stringify({ type: 'client-id-conflict' }));
socket.close(4009, 'Client ID is already in use.');
return;
}
connection.clientId = nextClientId;
connection.clientName = payload.clientName ? String(payload.clientName).trim() : connection.clientName;
connection.deviceId = payload.deviceId ? normalizeDeviceId(payload.deviceId) || connection.deviceId : connection.deviceId;
if (!connection.clientName && connection.clientId) {