diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-13 22:23:59 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-13 22:23:59 +0200 |
commit | 22d96bbd8d2f3c63328e0beb4e192eb9bf3d5ce3 (patch) | |
tree | 659ba958d21f3b3455b3a603111b861da3c14b69 /views/games_active.pug | |
parent | ede55b317dea7915f4ced8b628d2b31262dc2847 (diff) | |
download | server-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.pug | 2 |
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 |