chg: usr: the waiting dialog is uncloseable until the time is up #4
This commit is contained in:
@@ -166,8 +166,8 @@ const OnlinePlayersDialog = ({ open, onClose, currentGameAssoc }) => {
|
||||
return (
|
||||
<Dialog
|
||||
open={open}
|
||||
onClose={waitingCountdown > 0 ? undefined : onClose}
|
||||
disableEscapeKeyDown={waitingCountdown > 0}
|
||||
onClose={0 < waitingCountdown ? undefined : onClose}
|
||||
disableEscapeKeyDown={0 < waitingCountdown}
|
||||
sx={DIALOG_SX}
|
||||
>
|
||||
<div className="opd">
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user