summaryrefslogtreecommitdiff
path: root/views/head.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-05-27 20:17:57 +0200
committerTor Andersson <tor@ccxvii.net>2022-05-27 20:18:54 +0200
commit45912fb3a39323a5291373955540eba641df4ea6 (patch)
tree1b9792a6d060e6fd8f677ed8bf9859f5b7d5fa7e /views/head.pug
parent64e341b777632e90e11f57b1be1782ab5178a074 (diff)
downloadserver-45912fb3a39323a5291373955540eba641df4ea6.tar.gz
Don't go to replay screen of own games in game lists.
Diffstat (limited to 'views/head.pug')
-rw-r--r--views/head.pug12
1 files changed, 9 insertions, 3 deletions
diff --git a/views/head.pug b/views/head.pug
index 9f7a439..9c248a4 100644
--- a/views/head.pug
+++ b/views/head.pug
@@ -90,13 +90,19 @@ mixin gametable(status,table,hide_title=0)
else if status === 1
if row.is_yours
if row.is_shared
- a(href="/join/"+row.game_id)= "Play"
+ a(href="/join/"+row.game_id) Play
else
- a(href=`/${row.title_id}/play:${row.game_id}:${row.your_role}`)= "Play"
+ a(href=`/${row.title_id}/play:${row.game_id}:${row.your_role}`) Play
else
a(href=`/${row.title_id}/play:${row.game_id}`) View
else if status >= 2
- a(href=`/${row.title_id}/replay:${row.game_id}`) View
+ if row.is_yours
+ if row.is_shared
+ a(href="/join/"+row.game_id) View
+ else
+ a(href=`/${row.title_id}/play:${row.game_id}:${row.your_role}`) View
+ else
+ a(href=`/${row.title_id}/replay:${row.game_id}`) View
else
tr
case status