Show reconnect prompt after client update reload

This commit is contained in:
Jage9
2026-02-22 19:49:14 -05:00
parent d504e18771
commit 05e92fcb64
3 changed files with 14 additions and 2 deletions

View File

@@ -3,6 +3,8 @@
{
"date": "February 22, 2026",
"items": [
"Added volume adjustment for other users. Press left or right arrow from the user list.",
"Improved handling of audio streams so only nearby ones will be loaded, saves a ton of bandwidth.",
"Moved Use item to Enter Key instead of u, moved speak users to U from Shift U.",
"Added up/down arrows and page up/page down for numeric field adjustment.",
"Added user volume control and calibration.",

View File

@@ -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.22 R178";
window.CHGRID_WEB_VERSION = "2026.02.22 R179";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit";

View File

@@ -596,6 +596,12 @@ function reloadClientForVersion(version: string): void {
window.location.replace(nextUrl.toString());
}
/** Returns true when this page load came from the version-mismatch reload flow. */
function isVersionReloadedSession(): boolean {
const params = new URLSearchParams(window.location.search);
return params.has('v') && params.has('t');
}
/** Appends a chat/system line to the bounded status history buffer. */
function pushChatMessage(message: string): void {
messageBuffer.push(message);
@@ -2284,4 +2290,8 @@ if (storedNickname) {
}
updateConnectAvailability();
updateDeviceSummary();
updateStatus('Welcome to the Chat Grid. Press the Settings button to configure your audio, then Connect to join the grid.');
updateStatus(
isVersionReloadedSession()
? 'Client updated, please reconnect.'
: 'Welcome to the Chat Grid. Press the Settings button to configure your audio, then Connect to join the grid.',
);