diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-15 17:52:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-06-15 19:11:25 +0200 |
commit | 1ee47cf90e0ee8442bdaba2ed10bedabf39d0db5 (patch) | |
tree | fdc5337bd4c98799442aefcf3f07007d6e655a40 /views/join.ejs | |
parent | 48aa9edd3a1fbbd405c1001d052b0bbdf46b3de9 (diff) | |
download | server-1ee47cf90e0ee8442bdaba2ed10bedabf39d0db5.tar.gz |
Add "Rematch" button for easier repeat match making.
Diffstat (limited to 'views/join.ejs')
-rw-r--r-- | views/join.ejs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/views/join.ejs b/views/join.ejs index 42feaaf..2da5f03 100644 --- a/views/join.ejs +++ b/views/join.ejs @@ -81,6 +81,9 @@ Description: <%= game.description || "No description." %> %>Waiting for players to join the game.<% } } + if (game.status == 2 && players.some(p => p.user_id == user.user_id)) { + %><form action="/rematch/<%= game.game_id %>"><button type="submit">Rematch</button></form><% + } if (game.owner_id == user.user_id && (game.status == 0 || solo)) { %><p><br><button onclick="confirm_delete()">Delete</button><% } |