diff --git a/client/public/version.js b/client/public/version.js index eb94ade..be75492 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -1,5 +1,5 @@ // Maintainer-controlled web client version. // Format: YYYY.MM.DD Rn (example: 2026.02.20 R2) -window.CHGRID_WEB_VERSION = "2026.02.28 R312"; +window.CHGRID_WEB_VERSION = "2026.02.28 R313"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/main.ts b/client/src/main.ts index d972d22..27625eb 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -1551,7 +1551,6 @@ async function handleAuthResult(message: Extract { } let restartAnnouncement: string | null = null; let connectedAnnouncement: string | null = null; + let playSelfLoginSound = false; if (message.type === 'welcome') { applyAuthPolicy(message.auth?.policy); applyAuthPermissions(message.auth?.role, message.auth?.permissions); @@ -1883,6 +1883,7 @@ async function onSignalingMessage(message: IncomingMessage): Promise { connectedAnnouncement = reconnectInFlight ? `Reconnected to server. Version ${incomingVersion}.` : `Connected to server. Version ${incomingVersion}.`; + playSelfLoginSound = !reconnectInFlight; if ( !reloadScheduledForVersionMismatch && APP_VERSION && @@ -1905,7 +1906,10 @@ async function onSignalingMessage(message: IncomingMessage): Promise { } await onAppMessage(message); if (message.type === 'welcome') { - void setupMediaAfterAuth(); + await setupMediaAfterAuth(); + if (playSelfLoginSound) { + void audio.playSample(SYSTEM_SOUND_URLS.logon, 1); + } } itemBehaviorRegistry.onUseResultMessage(message); itemBehaviorRegistry.onWorldUpdate();