Improve the communication error message

This commit is contained in:
Andrio Celos
2023-02-27 14:06:49 +11:00
parent e11497fdfc
commit 206b1f988f

View File

@@ -159,7 +159,7 @@ function onGameStateChange(game: any, playerData: PlayerData | null) {
let errorDialogCallback: ((e: Event) => void) | null = null;
function communicationError(message?: string, showButton?: boolean, callback?: (e: Event) => void) {
preGameLoadingSection.hidden = true;
errorMessage.innerText = message ?? 'A communication error has occurred.';
errorMessage.innerText = message ?? 'A communication error has occurred.\nPlease reload the page to rejoin.';
errorDialogCallback = callback ?? null;
errorDialogForm.hidden = showButton != true;
errorDialog.showModal();