first version of passive mode
seems to work fine
This commit is contained in:
@@ -10,7 +10,9 @@
|
||||
|
||||
<div class="tab">
|
||||
<button class="tablinks" onclick="openTab(event, 'dashboard')", id="defaultOpen">Tlapbot dashboard</button>
|
||||
{% if not passive %}
|
||||
<button class="tablinks" onclick="openTab(event, 'redeems-list')">Redeems help</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id='dashboard' class="tabcontent">
|
||||
@@ -32,46 +34,53 @@
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if counters %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Active counters</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for counter in counters %}
|
||||
<tbody>
|
||||
<td> {{ counter[0] }} </td>
|
||||
<td> {{ counter[1] }} </td>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if passive %}
|
||||
<h3>Tlapbot is currently in passive mode.</h3>
|
||||
<p>You can't make any redeems, but you will receive points for watching.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if queue %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Recent redeems</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Redeem</th>
|
||||
<th>Redeemer</th>
|
||||
<th>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for row in queue %}
|
||||
<tbody>
|
||||
<td>{{ row[0].replace(tzinfo=utc_timezone).astimezone().strftime("%H:%M") }}</td>
|
||||
<td>{{ row[1] }}</td>
|
||||
<td>{{ row[3] }}</td>
|
||||
{% if row[2] %}
|
||||
<td>{{ row[2] }}</td>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% if not passive %}
|
||||
{% if counters %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Active counters</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for counter in counters %}
|
||||
<tbody>
|
||||
<td> {{ counter[0] }} </td>
|
||||
<td> {{ counter[1] }} </td>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if queue %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Recent redeems</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Time</th>
|
||||
<th>Redeem</th>
|
||||
<th>Redeemer</th>
|
||||
<th>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for row in queue %}
|
||||
<tbody>
|
||||
<td>{{ row[0].replace(tzinfo=utc_timezone).astimezone().strftime("%H:%M") }}</td>
|
||||
<td>{{ row[1] }}</td>
|
||||
<td>{{ row[3] }}</td>
|
||||
{% if row[2] %}
|
||||
<td>{{ row[2] }}</td>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</body>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user