summaryrefslogtreecommitdiff
path: root/views/head.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-02-24 11:59:40 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-24 13:39:07 +0100
commit9e068aa062bb07f1f1b8704beffefbcaba260eb7 (patch)
tree38a39f22bd44a068b2f6e048367d0b0b1a250e1b /views/head.pug
parentd097e2db5862177d1c30cbf7df0e8143e67d901d (diff)
downloadserver-9e068aa062bb07f1f1b8704beffefbcaba260eb7.tar.gz
Use URL search params instead of funky colon separated arguments.
Diffstat (limited to 'views/head.pug')
-rw-r--r--views/head.pug15
1 files changed, 6 insertions, 9 deletions
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
- | <a href="/join/#{item.game_id}">#{item.game_id}</a> &#x2013;
- | <a href="/#{item.title_id}">#{item.title_name}</a>
- | (#{item.scenario})
+ | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name} (#{item.scenario})</a>
else
div
- | <a href="/join/#{item.game_id}">#{item.game_id}</a> &#x2013;
- | <a href="/#{item.title_id}">#{item.title_name}</a>
+ | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name}</a>
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