diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-11-16 16:34:01 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-11-16 22:25:31 +0100 |
commit | 7b5ce7d3949755c12b663531ab5d0b3d3051de34 (patch) | |
tree | 27f152f8ba4c59f8a9116a43b903c7003bc4e671 /views | |
parent | 0030c0313852fbbc73ec0332a9b7d48b7b9ada52 (diff) | |
download | server-7b5ce7d3949755c12b663531ab5d0b3d3051de34.tar.gz |
Drop socket.io-passport module. Allow viewing games as guest.
Diffstat (limited to 'views')
-rw-r--r-- | views/forum_reply.ejs | 3 | ||||
-rw-r--r-- | views/games.ejs | 4 | ||||
-rw-r--r-- | views/info.ejs | 21 |
3 files changed, 15 insertions, 13 deletions
diff --git a/views/forum_reply.ejs b/views/forum_reply.ejs index 85bafad..3e87ddd 100644 --- a/views/forum_reply.ejs +++ b/views/forum_reply.ejs @@ -15,8 +15,7 @@ table .time { border-left: none; font-weight: normal; } <p> Reply: <br> -<textarea name="body" rows="15" cols="80" maxlength="32000" required autofocus - placeholder="Say something nice."></textarea> +<textarea name="body" rows="15" cols="80" maxlength="32000" required autofocus></textarea> <p> <button type="submit">Submit</button> </form> diff --git a/views/games.ejs b/views/games.ejs index acb94b6..3b3f485 100644 --- a/views/games.ejs +++ b/views/games.ejs @@ -31,7 +31,11 @@ <td class="description"><%= row.description %> <td class="time"><%= row.mtime %> <td class="role <%= row.is_active ? "is_active" : "" %>"><%= row.active %> +<% if (row.is_yours) { %> <td class="command"><a href="/join/<%= row.game_id %>">Enter</a> +<% } else { %> +<td class="command"><a href="/play/<%- row.game_id %>/Observer">View</a> +<% } %> <% }); } else { %> <tr><td colspan="8">No active games. <% } %> diff --git a/views/info.ejs b/views/info.ejs index f97b04e..7c98e21 100644 --- a/views/info.ejs +++ b/views/info.ejs @@ -5,8 +5,6 @@ Read more about the game on <a href="https://boardgamegeek.com/boardgame/<%= title.bgg %>">boardgamegeek.com</a>. -<% if (user) { %> - <h2>Open Games</h2> <table class="game"> <tr><th>ID<th>Scenario<th>Players<th>Description<th>Created<th> @@ -39,7 +37,11 @@ Read more about the game on <td class="description"><%= row.description %> <td class="time"><%= row.mtime %> <td class="<%= row.is_active ? "role is_active" : "role" %>"><%= row.active %> -<td class="command"><a href="/join/<%= row.game_id %>">Enter</a> +<% if (row.is_yours) { %> +<td class="command"><a href="/join/<%- row.game_id %>">Enter</a> +<% } else { %> +<td class="command"><a href="/play/<%- row.game_id %>/Observer">View</a> +<% } %> <% }); %> </table> <% } %> @@ -56,14 +58,11 @@ Read more about the game on <td class="description"><%= row.description %> <td class="time"><%= row.mtime %> <td class="result"><%= row.result %> -<td class="command"><a href="/join/<%= row.game_id %>">View</a> +<% if (row.is_yours) { %> +<td class="command"><a href="/join/<%= row.game_id %>">Enter</a> +<% } else { %> +<td class="command"><a href="/play/<%- row.game_id %>/Observer">View</a> +<% } %> <% }); %> </table> <% } %> - -<% } else { %> - -<p> -Login to create or join a game. - -<% } %> |