Webhost: support groups without loading multidata on every /room request

This commit is contained in:
Fabian Dill
2022-02-23 19:16:45 +01:00
parent 7708d3d157
commit f38f9a47da
4 changed files with 18 additions and 20 deletions

View File

@@ -22,7 +22,7 @@
{% if room.last_port %}
You can connect to this room by using '/connect {{ config['PATCH_TARGET'] }}:{{ room.last_port }}'
in the <a href="{{ url_for("tutorial_landing")}}">client</a>.<br>{% endif %}
{{ macros.list_patches_room(room, groups) }}
{{ macros.list_patches_room(room) }}
{% if room.owner == session["_id"] %}
<form method=post>
<div class="form-group">

View File

@@ -6,7 +6,7 @@
{{ caller() }}
</ul>
{%- endmacro %}
{% macro list_patches_room(room, groups) %}
{% macro list_patches_room(room) %}
{% if room.seed.slots %}
<table>
<thead>
@@ -19,7 +19,7 @@
</tr>
</thead>
<tbody>
{% for patch in room.seed.slots|list|sort(attribute="player_id") if patch.player_id not in groups %}
{% for patch in room.seed.slots|list|sort(attribute="player_id") %}
<tr>
<td>{{ patch.player_id }}</td>
<td>{{ patch.player_name }}</td>