From 419b6653b5177e599558991aaa6dbe71803a0f87 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 21 Oct 2024 12:29:28 +0200 Subject: Use env to control presence of tournaments. --- views/games_active.pug | 13 +++++++------ views/header.pug | 3 ++- views/user.pug | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'views') diff --git a/views/games_active.pug b/views/games_active.pug index 7da3b26..ee9687f 100644 --- a/views/games_active.pug +++ b/views/games_active.pug @@ -26,10 +26,10 @@ html p a(href="/create") Create a new game - +tourlist(seeds, active_pools, finished_pools) - - p - a(href="/tm/list") Join a tournament + if ENABLE_TOURNAMENTS + +tourlist(seeds, active_pools, finished_pools) + p + a(href="/tm/list") Join a tournament if move_games.length > 0 h2 Move @@ -53,5 +53,6 @@ html p a(href="/games/finished") All your finished games - br - a(href="/tm/finished") All your finished tournaments + if ENABLE_TOURNAMENTS + br + a(href="/tm/finished") All your finished tournaments diff --git a/views/header.pug b/views/header.pug index 6df51e6..e6cdeeb 100644 --- a/views/header.pug +++ b/views/header.pug @@ -9,7 +9,8 @@ header if user if ENABLE_FORUM a(href="/forum") Forum - a(href="/tm/list") Tournaments + if ENABLE_TOURNAMENTS + a(href="/tm/list") Tournaments a(href="/games/public") Public if user.waiting > 0 a(href="/games/active") Games (#{user.waiting}) diff --git a/views/user.pug b/views/user.pug index f3a30f0..fc55b42 100644 --- a/views/user.pug +++ b/views/user.pug @@ -65,7 +65,8 @@ html +gamelist(finished_games) p All #{who.name}'s finished games - p All #{who.name}'s finished tournaments + if ENABLE_TOURNAMENTS + p All #{who.name}'s finished tournaments if user && user.user_id === 1 if who.is_banned -- cgit v1.2.3