From 9e068aa062bb07f1f1b8704beffefbcaba260eb7 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 24 Feb 2023 11:59:40 +0100 Subject: Use URL search params instead of funky colon separated arguments. --- views/head.pug | 15 ++++++--------- views/join.pug | 4 ++-- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'views') diff --git a/views/head.pug b/views/head.pug index 6ea9285..2cb50a0 100644 --- a/views/head.pug +++ b/views/head.pug @@ -55,13 +55,10 @@ mixin gamelist(list,hide_title=0) div.game_head if item.scenario.length <= 2 div - | #{item.game_id} – - | #{item.title_name} - | (#{item.scenario}) + | #{item.game_id} – #{item.title_name} (#{item.scenario}) else div - | #{item.game_id} – - | #{item.title_name} + | #{item.game_id} – #{item.title_name} case item.status when 0 @@ -72,19 +69,19 @@ mixin gamelist(list,hide_title=0) when 1 if item.is_yours if item.your_role - a(class="command" href=`/${item.title_id}/play:${item.game_id}:${item.your_role}`) Play + a(class="command" href=`/${item.title_id}/play.html?game=${item.game_id}&role=${encodeURIComponent(item.your_role)}`) Play else a(class="command" href="/join/"+item.game_id) Play else - a(class="command" href=`/${item.title_id}/play:${item.game_id}`) View + a(class="command" href=`/${item.title_id}/play.html?game=${item.game_id}&role=Observer`) View when 2 if item.is_yours if item.your_role - a(class="command" href=`/${item.title_id}/play:${item.game_id}:${item.your_role}`) Review + a(class="command" href=`/${item.title_id}/play.html?game=${item.game_id}&role=${encodeURIComponent(item.your_role)}`) Review else a(class="command" href="/join/"+item.game_id) Review else - a(class="command" href=`/${item.title_id}/play:${item.game_id}`) Review + a(class="command" href=`/${item.title_id}/play.html?game=${item.game_id}&role=Observer`) Review div.game_main div.game_info diff --git a/views/join.pug b/views/join.pug index ab53ddc..90f0db7 100644 --- a/views/join.pug +++ b/views/join.pug @@ -38,9 +38,9 @@ html div if game.is_private - | Owner: #{game.owner_name} (private) + | Owner: #{game.owner_name} (private) else - | Owner: #{game.owner_name} + | Owner: #{game.owner_name} div Scenario: #{game.scenario} div Options: #{game.human_options} if game.status === 2 -- cgit v1.2.3