summaryrefslogtreecommitdiff
path: root/views/games_active.pug
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-13 22:23:59 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-13 22:23:59 +0200
commit22d96bbd8d2f3c63328e0beb4e192eb9bf3d5ce3 (patch)
tree659ba958d21f3b3455b3a603111b861da3c14b69 /views/games_active.pug
parentede55b317dea7915f4ced8b628d2b31262dc2847 (diff)
downloadserver-22d96bbd8d2f3c63328e0beb4e192eb9bf3d5ce3.tar.gz
Format human dates in view templates rather than in server queries.
Diffstat (limited to 'views/games_active.pug')
-rw-r--r--views/games_active.pug2
1 files changed, 1 insertions, 1 deletions
diff --git a/views/games_active.pug b/views/games_active.pug
index eaa1076..f47ae6e 100644
--- a/views/games_active.pug
+++ b/views/games_active.pug
@@ -5,7 +5,7 @@
- let move_games = games.filter(game => game.status === 1 && game.is_opposed && game.your_turn)
- let solo_games = games.filter(game => game.status === 1 && !game.is_opposed)
- let finished_games = games.filter(game => game.status === 2)
-- move_games.sort((a,b)=>a.time_left-b.time_left)
+- move_games.sort((a,b)=> a.mtime < b.mtime ? -1 : a.mtime > b.mtime ? 1 : 0)
doctype html
html
head