Private
Public Access
1
0

chg: usr: the waiting dialog is uncloseable until the time is up #4

This commit is contained in:
2026-04-14 21:04:05 +02:00
parent b134358e9e
commit 176e255037

View File

@@ -165,11 +165,11 @@ const OnlinePlayersDialog = ({ open, onClose, currentGameAssoc }) => {
return (
<Dialog
open={open}
onClose={waitingCountdown > 0 ? undefined : onClose}
disableEscapeKeyDown={waitingCountdown > 0}
sx={DIALOG_SX}
>
open={open}
onClose={0 < waitingCountdown ? undefined : onClose}
disableEscapeKeyDown={0 < waitingCountdown}
sx={DIALOG_SX}
>
<div className="opd">
<div className="opd-header">
<div className="opd-header-text">
@@ -182,8 +182,8 @@ const OnlinePlayersDialog = ({ open, onClose, currentGameAssoc }) => {
<div className="opd-header-actions">
<button
className={`opd-refresh${loading ? ' opd-refresh--spin' : ''}`}
onClick={() => { if (waitingCountdown === 0) setRefreshKey(k => k + 1); }}
disabled={loading || waitingCountdown > 0}
onClick={() => { if (0 === waitingCountdown) setRefreshKey(k => k + 1); }}
disabled={loading || 0 < waitingCountdown}
aria-label="Refresh"
title="Refresh list"
>
@@ -191,8 +191,8 @@ const OnlinePlayersDialog = ({ open, onClose, currentGameAssoc }) => {
</button>
<button
className="opd-close"
onClick={() => { if (waitingCountdown === 0) onClose(); }}
disabled={waitingCountdown > 0}
onClick={() => { if (0 === waitingCountdown) onClose(); }}
disabled={0 < waitingCountdown}
aria-label="Close"
>
<i className="fa fa-times" />