126 lines
6.0 KiB
HTML
126 lines
6.0 KiB
HTML
{% extends 'layout.html' %}
|
|
{% block head %}
|
|
<meta http-equiv="refresh" content="60">
|
|
<title>Multiworld Tracker for Room {{ room.id }}</title>
|
|
<link rel="stylesheet" type="text/css"
|
|
href="https://cdn.datatables.net/v/bs4/jq-3.3.1/dt-1.10.21/fh-3.1.7/datatables.min.css"/>
|
|
<script type="text/javascript"
|
|
src="https://cdn.datatables.net/v/bs4/jq-3.3.1/dt-1.10.21/fh-3.1.7/datatables.min.js"></script>
|
|
<script>
|
|
$(document).ready(function () {
|
|
var tables = $(".table").DataTable({
|
|
"paging": false,
|
|
"ordering": true,
|
|
"info": false,
|
|
"fixedHeader": true,
|
|
"dom": "t"
|
|
});
|
|
$('#searchbox').keyup(function () {
|
|
tables.search($(this).val()).draw();
|
|
})
|
|
})
|
|
</script>
|
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename="static.css") }}"/>
|
|
{% endblock %}
|
|
{% block body %}
|
|
<input id="searchbox" class="form-control" type="text" placeholder="Search">
|
|
{% for team, players in inventory.items() %}
|
|
<table class="table table-striped table-bordered table-hover table-sm">
|
|
<thead class="thead-dark">
|
|
<tr>
|
|
<th>#</th>
|
|
<th>Name</th>
|
|
{% for name in tracking_names %}
|
|
{% if name in icons %}
|
|
<th style="text-align: center"><img height="32" width="32" style="object-fit: contain"
|
|
src="{{ icons[name] }}"
|
|
alt="{{ name|e }}"></th>
|
|
{% else %}
|
|
<th>{{ name|e }}</th>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for player, items in players.items() %}
|
|
<tr>
|
|
<td class="table-info">{{ loop.index }}</td>
|
|
<td class="table-info">{{ player_names[(team, loop.index)] }}</td>
|
|
{% for id in tracking_ids %}
|
|
|
|
{% if items[id] %}
|
|
<td style="text-align: center" class="table-success">
|
|
{% if id in multi_items %}{{ items[id] }}{% else %}✔️{% endif %}</td>
|
|
{% else %}
|
|
<td></td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{% for team, players in checks_done.items() %}
|
|
<table class="table table-striped table-bordered table-hover table-sm">
|
|
<thead class="thead-dark">
|
|
<tr>
|
|
<th rowspan="2">#</th>
|
|
<th rowspan="2">Name</th>
|
|
{% for area in ordered_areas %}
|
|
{% set colspan = (3 if area in key_locations else 1) %}
|
|
{% if area in icons %}
|
|
<th colspan="{{ colspan }}" style="text-align: center"><img height="32" width="32"
|
|
style="object-fit: contain"
|
|
src="{{ icons[area] }}"
|
|
alt="{{ area }}"></th>
|
|
{% else %}
|
|
<th colspan="{{ colspan }}">{{ area }}</th>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<th rowspan="2">Last Activity</th>
|
|
</tr>
|
|
<tr>
|
|
{% for area in ordered_areas %}
|
|
<th style="text-align: center"><img height="32" width="32" style="object-fit: contain"
|
|
src="{{ icons["Chest"] }}" alt="Checks"></th>
|
|
{% if area in key_locations %}
|
|
<th style="text-align: center"><img height="32" width="32" style="object-fit: contain"
|
|
src="{{ icons["Small Key"] }}" alt="Small Key"></th>
|
|
<th style="text-align: center"><img height="32" width="32" style="object-fit: contain"
|
|
src="{{ icons["Big Key"] }}" alt="Big Key"></th>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for player, checks in players.items() %}
|
|
<tr>
|
|
<td class="table-info">{{ loop.index }}</td>
|
|
<td class="table-info">{{ player_names[(team, loop.index)]|e }}</td>
|
|
{% for area in ordered_areas %}
|
|
{% set checks_done = checks[area] %}
|
|
{% set checks_total = checks_in_area[area] %}
|
|
{% if checks_done == checks_total %}
|
|
<td style="text-align: center" class="table-success">
|
|
{{ checks_done }}/{{ checks_total }}</td>
|
|
{% else %}
|
|
<td style="text-align: center">{{ checks_done }}/{{ checks_total }}</td>
|
|
{% endif %}
|
|
{% if area in key_locations %}
|
|
<td>{{ inventory[team][player][small_key_ids[area]] }}</td>
|
|
<td>{% if inventory[team][player][big_key_ids[area]] %}✔️{% endif %}</td>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% if activity_timers[(team, player)] %}
|
|
<td class="table-info">{{ activity_timers[(team, player)] | render_timedelta }}</td>
|
|
{% else %}
|
|
<td class="table-warning">None</td>{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endfor %}
|
|
{% endblock %} |