summaryrefslogtreecommitdiff
path: root/views/join.ejs
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-15 17:52:18 +0200
committerTor Andersson <tor@ccxvii.net>2021-06-15 19:11:25 +0200
commit1ee47cf90e0ee8442bdaba2ed10bedabf39d0db5 (patch)
treefdc5337bd4c98799442aefcf3f07007d6e655a40 /views/join.ejs
parent48aa9edd3a1fbbd405c1001d052b0bbdf46b3de9 (diff)
downloadserver-1ee47cf90e0ee8442bdaba2ed10bedabf39d0db5.tar.gz
Add "Rematch" button for easier repeat match making.
Diffstat (limited to 'views/join.ejs')
-rw-r--r--views/join.ejs3
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><%
}