summaryrefslogtreecommitdiff
path: root/views/head.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-11 15:21:24 +0200
committerTor Andersson <tor@ccxvii.net>2023-09-15 19:38:13 +0200
commitf5ea88328ef1b4dabd5f58b4c78ad4e175c96765 (patch)
tree7ae9b9cf8b1e1d44b3dbd18ae6a6e26f39c2f11f /views/head.pug
parent55625376e409a96bda56a65dfd8266c6dcb215da (diff)
downloadserver-f5ea88328ef1b4dabd5f58b4c78ad4e175c96765.tar.gz
Add user links to join page.
Diffstat (limited to 'views/head.pug')
-rw-r--r--views/head.pug7
1 files changed, 4 insertions, 3 deletions
diff --git a/views/head.pug b/views/head.pug
index fa2b042..0fc415b 100644
--- a/views/head.pug
+++ b/views/head.pug
@@ -43,8 +43,8 @@ mixin gamelist(list,hide_title=0)
div
-
let className = "game_item"
+ let chat_icon = ""
if (item.your_turn) className += " your_turn"
- if (item.is_unread) className += " unread"
if (item.status === 0 && item.join_count === 0) className += " open replacement"
else if (item.status === 0 && item.join_count !== item.player_count) className += " open"
else if (item.status === 0 && item.join_count === item.player_count) className += " ready"
@@ -52,15 +52,16 @@ mixin gamelist(list,hide_title=0)
else if (item.status === 1 && item.join_count === item.player_count) className += " active"
else if (item.status === 2) className += " finished"
else if (item.status === 3) className += " archived"
+ if (item.is_unread) chat_icon = "\u{1f4dd}"
div(class=className)
div.game_head
if item.scenario.length <= 2
div
- | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name} (#{item.scenario})</a>
+ | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name} (#{item.scenario})</a> #{chat_icon}
else
div
- | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name}</a>
+ | <a href="/join/#{item.game_id}">#{item.game_id} &#x2013; #{item.title_name}</a> #{chat_icon}
case item.status
when 0