| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  | {% extends 'layout.html' %} | 
					
						
							|  |  |  | {% block head %} | 
					
						
							| 
									
										
										
										
											2020-06-21 15:42:26 +02:00
										 |  |  |     <title>Multiworld Tracker for Room {{ room.id }}</title> | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-24 09:44:56 +02:00
										 |  |  |     <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"/> | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  |     <link rel="stylesheet" type="text/css" href="{{ static_autoversion("static.css") }}"/> | 
					
						
							| 
									
										
										
										
											2020-06-24 09:44:56 +02:00
										 |  |  |     <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> | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  |     <script src="{{ static_autoversion("jquery.scrollsync.js") }}"></script> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-24 09:44:56 +02:00
										 |  |  |     <script> | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-24 09:44:56 +02:00
										 |  |  |         $(document).ready(function () { | 
					
						
							| 
									
										
										
										
											2020-06-24 13:29:40 +02:00
										 |  |  |             var tables = $(".table").DataTable({ | 
					
						
							| 
									
										
										
										
											2020-06-24 09:44:56 +02:00
										 |  |  |                 "paging": false, | 
					
						
							|  |  |  |                 "ordering": true, | 
					
						
							|  |  |  |                 "info": false, | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  |                 "dom": "t", | 
					
						
							|  |  |  |                 "scrollY": "39vh", | 
					
						
							|  |  |  |                 "scrollCollapse": true, | 
					
						
							| 
									
										
										
										
											2020-06-24 09:44:56 +02:00
										 |  |  |             }); | 
					
						
							| 
									
										
										
										
											2020-06-24 18:22:18 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-24 13:29:40 +02:00
										 |  |  |             $('#searchbox').keyup(function () { | 
					
						
							|  |  |  |                 tables.search($(this).val()).draw(); | 
					
						
							| 
									
										
										
										
											2020-06-24 18:22:18 +02:00
										 |  |  |             }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             function update() { | 
					
						
							|  |  |  |                 var target = $("<div></div>"); | 
					
						
							| 
									
										
										
										
											2020-06-27 18:17:36 +02:00
										 |  |  |                 target.load("/tracker/{{ room.tracker }}", function (response, status) { | 
					
						
							| 
									
										
										
										
											2020-06-24 18:22:18 +02:00
										 |  |  |                     if (status === "success") { | 
					
						
							|  |  |  |                         target.find(".table").each(function (i, new_table) { | 
					
						
							|  |  |  |                             var new_trs = $(new_table).find("tbody>tr"); | 
					
						
							|  |  |  |                             var old_table = tables.eq(i); | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  |                             var topscroll = $(old_table.settings()[0].nScrollBody).scrollTop(); | 
					
						
							|  |  |  |                             var leftscroll = $(old_table.settings()[0].nScrollBody).scrollLeft(); | 
					
						
							| 
									
										
										
										
											2020-06-24 18:22:18 +02:00
										 |  |  |                             old_table.clear(); | 
					
						
							|  |  |  |                             old_table.rows.add(new_trs).draw(); | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  |                             $(old_table.settings()[0].nScrollBody).scrollTop(topscroll); | 
					
						
							|  |  |  |                             $(old_table.settings()[0].nScrollBody).scrollLeft(leftscroll); | 
					
						
							| 
									
										
										
										
											2020-06-24 18:22:18 +02:00
										 |  |  |                         }); | 
					
						
							|  |  |  |                     } else { | 
					
						
							|  |  |  |                         console.log("Failed to connect to Server, in order to update Table Data."); | 
					
						
							|  |  |  |                         console.log(response); | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 }) | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             setInterval(update, 30000); | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |             $(".dataTables_scrollBody").scrollsync({ | 
					
						
							|  |  |  |                 y_sync: true, | 
					
						
							|  |  |  |                 x_sync: true | 
					
						
							|  |  |  |             }) | 
					
						
							|  |  |  |             $(window).resize(function () { | 
					
						
							|  |  |  |                 tables.draw(); | 
					
						
							|  |  |  |             }); | 
					
						
							|  |  |  |             setTimeout( | 
					
						
							|  |  |  |                 tables.draw, {# this fixes the top header misalignment, for some reason #} | 
					
						
							|  |  |  |                 500 | 
					
						
							|  |  |  |             ); | 
					
						
							| 
									
										
										
										
											2020-06-24 09:44:56 +02:00
										 |  |  |         }) | 
					
						
							|  |  |  |     </script> | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  | {% endblock %} | 
					
						
							|  |  |  | {% block body %} | 
					
						
							| 
									
										
										
										
											2020-06-24 13:29:40 +02:00
										 |  |  |     <input id="searchbox" class="form-control" type="text" placeholder="Search"> | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  |     <div> | 
					
						
							|  |  |  |         {% for team, players in inventory.items() %} | 
					
						
							|  |  |  |             <table class="table table-striped table-bordered table-hover table-sm"> | 
					
						
							|  |  |  |                 <thead class="thead-dark"> | 
					
						
							| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  |             <tr> | 
					
						
							| 
									
										
										
										
											2020-06-22 04:08:09 +02:00
										 |  |  |                 <th>#</th> | 
					
						
							| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  |                 <th>Name</th> | 
					
						
							|  |  |  |                 {% for name in tracking_names %} | 
					
						
							| 
									
										
										
										
											2020-06-21 17:44:50 +02:00
										 |  |  |                     {% if name in icons %} | 
					
						
							| 
									
										
										
										
											2020-06-28 10:51:48 +02:00
										 |  |  |                         <th style="text-align: center"><img class="alttp-sprite" | 
					
						
							| 
									
										
										
										
											2020-06-22 03:53:00 +02:00
										 |  |  |                                                             src="{{ icons[name] }}" | 
					
						
							| 
									
										
										
										
											2020-06-24 13:29:40 +02:00
										 |  |  |                                                             alt="{{ name|e }}"></th> | 
					
						
							| 
									
										
										
										
											2020-06-21 17:44:50 +02:00
										 |  |  |                     {% else %} | 
					
						
							| 
									
										
										
										
											2020-06-24 13:29:40 +02:00
										 |  |  |                         <th>{{ name|e }}</th> | 
					
						
							| 
									
										
										
										
											2020-06-21 17:44:50 +02:00
										 |  |  |                     {% endif %} | 
					
						
							| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  |                 {% endfor %} | 
					
						
							|  |  |  |             </tr> | 
					
						
							|  |  |  |             </thead> | 
					
						
							|  |  |  |             <tbody> | 
					
						
							|  |  |  |             {% for player, items in players.items() %} | 
					
						
							|  |  |  |                 <tr> | 
					
						
							| 
									
										
										
										
											2020-06-22 00:58:18 +02:00
										 |  |  |                     <td class="table-info">{{ loop.index }}</td> | 
					
						
							| 
									
										
										
										
											2020-06-27 13:52:03 +02:00
										 |  |  |                     {% if (team, loop.index) in video %} | 
					
						
							| 
									
										
										
										
											2020-06-29 03:59:16 +02:00
										 |  |  |                         <td class="table-info"> | 
					
						
							|  |  |  |                             <a target="_blank" href="https://www.twitch.tv/{{ video[(team, loop.index)][1] }}"> | 
					
						
							|  |  |  |                                 {{ player_names[(team, loop.index)] }} | 
					
						
							|  |  |  |                                 ▶️</a></td> | 
					
						
							| 
									
										
										
										
											2020-06-27 13:52:03 +02:00
										 |  |  |                     {% else %} | 
					
						
							|  |  |  |                         <td class="table-info">{{ player_names[(team, loop.index)] }}</td>{% endif %} | 
					
						
							| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  |                     {% for id in tracking_ids %} | 
					
						
							| 
									
										
										
										
											2020-06-22 00:58:18 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |                         {% if items[id] %} | 
					
						
							| 
									
										
										
										
											2020-06-22 03:53:00 +02:00
										 |  |  |                             <td style="text-align: center" class="table-success"> | 
					
						
							| 
									
										
										
										
											2020-06-22 00:58:18 +02:00
										 |  |  |                                 {% if id in multi_items %}{{ items[id] }}{% else %}✔️{% endif %}</td> | 
					
						
							|  |  |  |                         {% else %} | 
					
						
							|  |  |  |                             <td></td> | 
					
						
							|  |  |  |                         {% endif %} | 
					
						
							| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  |                     {% endfor %} | 
					
						
							|  |  |  |                 </tr> | 
					
						
							|  |  |  |             {% endfor %} | 
					
						
							|  |  |  |             </tbody> | 
					
						
							|  |  |  |         </table> | 
					
						
							|  |  |  |     {% endfor %} | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |     {% for team, players in checks_done.items() %} | 
					
						
							|  |  |  |         <table class="table table-striped table-bordered table-hover table-sm"> | 
					
						
							|  |  |  |             <thead class="thead-dark"> | 
					
						
							|  |  |  |             <tr> | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                 <th rowspan="2">#</th> | 
					
						
							|  |  |  |                 <th rowspan="2">Name</th> | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                 {% for area in ordered_areas %} | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                     {% set colspan = (3 if area in key_locations else 1) %} | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                     {% if area in icons %} | 
					
						
							| 
									
										
										
										
											2020-06-28 10:51:48 +02:00
										 |  |  |                         <th colspan="{{ colspan }}" style="text-align: center"><img class="alttp-sprite" | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                                                                                     src="{{ icons[area] }}" | 
					
						
							|  |  |  |                                                                                     alt="{{ area }}"></th> | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                     {% else %} | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                         <th colspan="{{ colspan }}">{{ area }}</th> | 
					
						
							|  |  |  |                     {% endif %} | 
					
						
							|  |  |  |                 {% endfor %} | 
					
						
							|  |  |  |                 <th rowspan="2">Last Activity</th> | 
					
						
							|  |  |  |             </tr> | 
					
						
							|  |  |  |             <tr> | 
					
						
							|  |  |  |                 {% for area in ordered_areas %} | 
					
						
							| 
									
										
										
										
											2020-06-28 10:51:48 +02:00
										 |  |  |                     <th style="text-align: center"><img class="alttp-sprite" src="{{ icons["Chest"] }}" alt="Checks"> | 
					
						
							|  |  |  |                     </th> | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                     {% if area in key_locations %} | 
					
						
							| 
									
										
										
										
											2020-06-28 10:51:48 +02:00
										 |  |  |                         <th style="text-align: center"><img class="alttp-sprite" | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                                                             src="{{ icons["Small Key"] }}" alt="Small Key"></th> | 
					
						
							| 
									
										
										
										
											2020-06-28 10:51:48 +02:00
										 |  |  |                         <th style="text-align: center"><img class="alttp-sprite" | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                                                             src="{{ icons["Big Key"] }}" alt="Big Key"></th> | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                     {% endif %} | 
					
						
							|  |  |  |                 {% endfor %} | 
					
						
							|  |  |  |             </tr> | 
					
						
							|  |  |  |             </thead> | 
					
						
							|  |  |  |             <tbody> | 
					
						
							|  |  |  |             {% for player, checks in players.items() %} | 
					
						
							|  |  |  |                 <tr> | 
					
						
							|  |  |  |                     <td class="table-info">{{ loop.index }}</td> | 
					
						
							| 
									
										
										
										
											2020-06-24 13:29:40 +02:00
										 |  |  |                     <td class="table-info">{{ player_names[(team, loop.index)]|e }}</td> | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                     {% 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 %} | 
					
						
							| 
									
										
										
										
											2020-06-23 05:46:32 +02:00
										 |  |  |                             <td style="text-align: center">{{ checks_done }}/{{ checks_total }}</td> | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                         {% endif %} | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                         {% 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 %} | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                     {% endfor %} | 
					
						
							| 
									
										
										
										
											2020-06-23 14:37:41 +02:00
										 |  |  |                     {% if activity_timers[(team, player)] %} | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                         <td class="table-info">{{ activity_timers[(team, player)] | render_timedelta }}</td> | 
					
						
							| 
									
										
										
										
											2020-06-23 14:37:41 +02:00
										 |  |  |                     {% else %} | 
					
						
							| 
									
										
										
										
											2020-06-24 16:06:19 +02:00
										 |  |  |                         <td class="table-warning">None</td>{% endif %} | 
					
						
							| 
									
										
										
										
											2020-06-23 02:50:07 +02:00
										 |  |  |                 </tr> | 
					
						
							|  |  |  |             {% endfor %} | 
					
						
							|  |  |  |             </tbody> | 
					
						
							|  |  |  |         </table> | 
					
						
							|  |  |  |     {% endfor %} | 
					
						
							| 
									
										
										
										
											2020-06-30 07:32:05 +02:00
										 |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2020-06-21 15:32:31 +02:00
										 |  |  | {% endblock %} |