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

@@ -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.',
);