summaryrefslogtreecommitdiff
path: root/views/join.ejs
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-05-16 16:59:19 +0200
committerTor Andersson <tor@ccxvii.net>2021-05-16 17:02:44 +0200
commit304f528f813beec76acf621ba6df5e3e0cb59eba (patch)
tree0004cd3ed17482d9e4020c4874281de6c1a59382 /views/join.ejs
parent0247427e0351080e96cc97ab75a8bc614b6b20bd (diff)
downloadserver-304f528f813beec76acf621ba6df5e3e0cb59eba.tar.gz
server: Random role selection.
Diffstat (limited to 'views/join.ejs')
-rw-r--r--views/join.ejs14
1 files changed, 8 insertions, 6 deletions
diff --git a/views/join.ejs b/views/join.ejs
index 810e0f4..42feaaf 100644
--- a/views/join.ejs
+++ b/views/join.ejs
@@ -11,9 +11,11 @@ function confirm_delete(status) {
<p>
Owner: <%= game.owner_name %>
-<p>
+<br>
+Private: <%= game.private ? "yes" : "no" %>
+<br>
Scenario: <%= game.scenario %>
-<p>
+<br>
Description: <%= game.description || "No description." %>
<br clear=left>
@@ -23,18 +25,18 @@ Description: <%= game.description || "No description." %>
<tr>
<%
roles.forEach((role) => {
- %><th><%= role.role %><%
+ %><th><%= role %><%
});
%>
<tr>
<%
roles.forEach((role) => {
- if (game.active == role.role || game.active == "Both" || game.active == "All") {
+ if (game.active == role || game.active == "Both" || game.active == "All") {
%><td style="min-width:9em" class="your_turn"><%
} else {
%><td style="min-width:9em"><%
}
- let p = players.find(p => p.role == role.role);
+ let p = players.find(p => p.role == role);
if (game.status == 0) {
if (p) {
if ((p.user_id == user.user_id) || (game.owner_id == user.user_id)) {
@@ -44,7 +46,7 @@ Description: <%= game.description || "No description." %>
%><%= p.name %><%
}
} else {
- %><a href="/join/<%= game.game_id %>/<%= role.role %>">Join</a><%
+ %><a href="/join/<%= game.game_id %>/<%= role %>">Join</a><%
}
} else {
if (p) {