From 45912fb3a39323a5291373955540eba641df4ea6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 27 May 2022 20:17:57 +0200 Subject: Don't go to replay screen of own games in game lists. --- views/head.pug | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'views/head.pug') 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 -- cgit v1.2.3