summaryrefslogtreecommitdiff
path: root/views/user.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-02-12 00:43:30 +0100
committerTor Andersson <tor@ccxvii.net>2025-02-14 12:27:41 +0100
commitea5ee6b976dedc1ac54d7fb71473db0131d735be (patch)
tree052afd30d305d11e0f572fcbf0ecdb1f5857f0bb /views/user.pug
parent0b9c2f44c58f7750f03f218da8c2444cb8c987f7 (diff)
downloadserver-ea5ee6b976dedc1ac54d7fb71473db0131d735be.tar.gz
Show play stats on user pages.
Timeout and move time. Most played games.
Diffstat (limited to 'views/user.pug')
-rw-r--r--views/user.pug27
1 files changed, 27 insertions, 0 deletions
diff --git a/views/user.pug b/views/user.pug
index fc55b42..4aecb0b 100644
--- a/views/user.pug
+++ b/views/user.pug
@@ -42,6 +42,33 @@ html
br
a(href="/contacts/add-enemy/"+who.name) Add to blacklist
+ h3 Response time
+ div Average response time: #{(who.move_time_avg * 24).toFixed(2)} hours
+
+ h3 Timeouts
+ div Total number of timeouts: #{who.timeout_total}
+ div Games completed since last timeout: #{who.games_since_timeout}
+
+ if ratings.length > 0
+ h3 Most played games
+ table
+ thead
+ tr
+ th Title
+ th Count
+ th Last played
+ if user && user.user_id === 1
+ th Elo
+ tbody
+ each row in ratings
+ tr
+ td
+ a.black(href="/" + row.title_id)= row.title_name
+ td.r= row.count
+ td.r= row.last
+ if user && user.user_id === 1
+ td.r= row.rating
+
+tourlist(null, active_pools, finished_pools)
if open_games.length > 0