56 lines
2.3 KiB
HTML
56 lines
2.3 KiB
HTML
{% extends 'tablepage.html' %}
|
|
|
|
{% block head %}
|
|
{{ super() }}
|
|
<title>Upload Multidata</title>
|
|
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/uploads.css") }}" />
|
|
<script type="application/ecmascript" src="{{ static_autoversion("assets/uploads.js") }}"></script>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<div id="uploads-wrapper">
|
|
<div id="uploads" class="main-content">
|
|
<h3>Upload Multidata</h3>
|
|
<p>To host a game, you need to upload a .multidata file or a .zip file created by the
|
|
multiworld generator.</p>
|
|
<div id="uploads-form-wrapper">
|
|
<form id="upload-form" method="post" enctype="multipart/form-data">
|
|
<input id="file-input" type="file" name="file">
|
|
</form>
|
|
<button id="upload-button">Upload</button>
|
|
</div>
|
|
|
|
{% if rooms %}
|
|
<p>Your Rooms:</p>
|
|
<table id="uploads-table" class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Seed</th>
|
|
<th>Room</th>
|
|
<th>Players</th>
|
|
<th>Created</th>
|
|
<th>Last Activity</th>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for room in rooms %}
|
|
<tr>
|
|
<td><a href="{{ url_for("view_seed", seed=room.seed.id) }}">{{ room.seed.id|suuid }}</a>
|
|
</td>
|
|
<td><a href="{{ url_for("host_room", room=room.id) }}">{{ room.id|suuid }}</a></td>
|
|
<td>{{ room.seed.multidata.names[0]|length }} Total:
|
|
{{ room.seed.multidata.names[0]|join(", ")|truncate(256, False, " ...") }}</td>
|
|
<td>{{ room.creation_time.strftime("%Y-%m-%d %H:%M") }}</td>
|
|
<td>{{ room.last_activity.strftime("%Y-%m-%d %H:%M") }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>No rooms owned by you were found. Upload a file to get started.</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|