commit 58319af47507ba020708f92e4ea3b9b85569fd01
parent a71dbd2fab78586b6a8ca35d0566a653001aaf10
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Mon, 12 Jun 2023 12:43:31 -0700
fix logic for resign button
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/web/handlers/interceptors/chess.go b/pkg/web/handlers/interceptors/chess.go
@@ -345,7 +345,7 @@ func (g *ChessGame) drawPlayerCard(key string, isBlack, isSpectator, isYourTurn,
</tr>
<tr>
<td>
- {{ if not (and .IsSpectator .GameOver) }}
+ {{ if and (not .IsSpectator) (not .GameOver) }}
<form method="post" style="display: inline-block;">
<input type="hidden" name="message" value="resign" />
<button type="submit" style="background-color: #aaa; margin: 5px 0;">Resign</button>