From 304f528f813beec76acf621ba6df5e3e0cb59eba Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 16 May 2021 16:59:19 +0200 Subject: server: Random role selection. --- views/create.ejs | 5 +++++ views/join.ejs | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'views') diff --git a/views/create.ejs b/views/create.ejs index ed9ae9e..5db8fe6 100644 --- a/views/create.ejs +++ b/views/create.ejs @@ -15,6 +15,11 @@ Description:

+

+ 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) {

Owner: <%= game.owner_name %> -

+
+Private: <%= game.private ? "yes" : "no" %> +
Scenario: <%= game.scenario %> -

+
Description: <%= game.description || "No description." %>
@@ -23,18 +25,18 @@ Description: <%= game.description || "No description." %> <% roles.forEach((role) => { - %><%= role.role %><% + %><%= role %><% }); %> <% roles.forEach((role) => { - if (game.active == role.role || game.active == "Both" || game.active == "All") { + if (game.active == role || game.active == "Both" || game.active == "All") { %><% } else { %><% } - 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 { - %>Join<% + %>Join<% } } else { if (p) { -- cgit v1.2.3