Show global header message when bot loses connection with server

This commit is contained in:
Jeremy Zhang
2017-06-13 01:39:49 +00:00
parent 926d4d14a9
commit 2647753007
8 changed files with 78 additions and 2 deletions

View File

@ -21,6 +21,7 @@
{% endif %}
</head>
<body>
{% include 'nobot_header.html.j2' %}
<div class="navbar-fixed">
<nav>
<div class="nav-wrapper">
@ -76,6 +77,7 @@
<div id="loginmodal" class="modal">
<div class="modal-content">
{% include 'nobot_header.html.j2' %}
<h4>{{ login_greeting }}</h4>
<div id="loginmodal-maincontent" class="row valign-wrap">
<div id="modal_guildinfobox" class="col m3 s12 center-align">

View File

@ -0,0 +1,10 @@
{% if not bot_status["status"] %}
<div style="border: solid 3px red; background-color: yellow; color: black;">
<p>
<strong>NOTICE!</strong>
The bot is <strong>currently not online</strong> or has <strong>lost the connection</strong> to the webserver.
If you see this header, please <a href="https://discord.io/titan" target="_blank" style="background-color: orange; color: blue;">notify us</a> as soon as possible for us to fix this issue.
Down since approximately <code>{{ bot_status["formatted_utc"] }}</code> UTC (<code>{{ bot_status["epoch_seconds"] }} epoch seconds</code>).
</p>
</div>
{% endif %}

View File

@ -19,6 +19,7 @@
{% include 'google_analytics.html.j2' %}
</head>
<body>
{% include 'nobot_header.html.j2' %}
<main>
{% if session['unauthenticated'] is defined and not session['unauthenticated'] %}
<ul id="menu_dropdown" class="dropdown-content">