mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Add Seeds Table
This commit is contained in:
@@ -53,6 +53,32 @@
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
{% if seeds %}
|
||||
<h4>Your Games:</h4>
|
||||
<table id="seed-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Seed</th>
|
||||
<th class="center">Players</th>
|
||||
<th>Created (UTC)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for seed in seeds %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for("viewSeed", seed=seed.id) }}">{{ seed.id|suuid }}</a></td>
|
||||
<td class="center"
|
||||
{% if seed.multidata %}
|
||||
data-tooltip="{{ seed.multidata.names[0]|join(", ")|truncate(256, False, " ...") }}"
|
||||
{% endif %}
|
||||
>{% if seed.multidata %}{{ seed.multidata.names[0]|length }}{% else %}1{% endif %}
|
||||
</td>
|
||||
<td>{{ seed.creation_time.strftime("%Y-%m-%d %H:%M") }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -70,7 +70,8 @@ def uploads():
|
||||
else:
|
||||
flash("Not recognized file format. Awaiting a .multidata file.")
|
||||
rooms = select(room for room in Room if room.owner == session["_id"])
|
||||
return render_template("hostGame.html", rooms=rooms)
|
||||
seeds = select(seed for seed in Seed if seed.owner == session["_id"])
|
||||
return render_template("hostGame.html", rooms=rooms, seeds=seeds)
|
||||
|
||||
|
||||
def allowed_file(filename):
|
||||
|
Reference in New Issue
Block a user