summaryrefslogtreecommitdiff
path: root/views/games.ejs
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-11-16 16:34:01 +0100
committerTor Andersson <tor@ccxvii.net>2021-11-16 22:25:31 +0100
commit7b5ce7d3949755c12b663531ab5d0b3d3051de34 (patch)
tree27f152f8ba4c59f8a9116a43b903c7003bc4e671 /views/games.ejs
parent0030c0313852fbbc73ec0332a9b7d48b7b9ada52 (diff)
downloadserver-7b5ce7d3949755c12b663531ab5d0b3d3051de34.tar.gz
Drop socket.io-passport module. Allow viewing games as guest.
Diffstat (limited to 'views/games.ejs')
-rw-r--r--views/games.ejs4
1 files changed, 4 insertions, 0 deletions
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.
<% } %>