diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/header.pug | 3 | ||||
-rw-r--r-- | views/index.pug | 5 | ||||
-rw-r--r-- | views/profile.pug | 33 |
3 files changed, 26 insertions, 15 deletions
diff --git a/views/header.pug b/views/header.pug index 61f5250..c417665 100644 --- a/views/header.pug +++ b/views/header.pug @@ -4,7 +4,8 @@ header nav a(href="/about") About if user - a(href="/forum") Forum + if ENABLE_FORUM + a(href="/forum") Forum a(href="/games/public") Public if user.active > 0 a(href="/games/active") Games (#{user.active}) diff --git a/views/index.pug b/views/index.pug index 6b90638..8e399a7 100644 --- a/views/index.pug +++ b/views/index.pug @@ -48,3 +48,8 @@ html a(href="/"+title.title_id)= title.title_name p!= process.env.SITE_INVITE + + if !ENABLE_MAIL + p.error Mail notifications disabled. + if !ENABLE_WEBHOOKS + p.error Webhook notifications disabled. diff --git a/views/profile.pug b/views/profile.pug index 63d3018..d884f8f 100644 --- a/views/profile.pug +++ b/views/profile.pug @@ -12,10 +12,14 @@ html p Welcome, #{user.name}! p Your mail address is #{user.mail} - if user.notify - p <a href="/unsubscribe">Disable mail notifications</a> - else - p <a href="/subscribe">Enable mail notifications</a> + if ENABLE_MAIL + if !user.is_verified + p <a href="/verify-mail">Verify your mail address</a> + + if user.notify + p <a href="/unsubscribe">Disable mail notifications</a> + else + p <a href="/subscribe">Enable mail notifications</a> p | <a href="/change-password">Change password</a> @@ -28,16 +32,17 @@ html br | <a href="/delete-account">Delete account</a> - if !user.webhook - p <a href="/webhook">Configure webhook</a> - else if user.webhook.error - dl - dt <a href="/webhook">Configure webhook</a> - dd.error ERROR: #{user.webhook.error} - else - dl - dt <a href="/webhook">Configure webhook</a> - dd= new URL(user.webhook.url).hostname + if ENABLE_WEBHOOKS + if !user.webhook + p <a href="/webhook">Configure webhook</a> + else if user.webhook.error + dl + dt <a href="/webhook">Configure webhook</a> + dd.error ERROR: #{user.webhook.error} + else + dl + dt <a href="/webhook">Configure webhook</a> + dd= new URL(user.webhook.url).hostname p form(action="/logout" method="post") |