xygt/app/templates/dashboard.html

68 lines
2.1 KiB
HTML
Raw Normal View History

{% extends 'base.html' %}
{% block content %}
<script>
function showUserIDandIDPass() {
var x = document.getElementById("userid");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</script>
<h1>Dashboard</h1>
<p>Hello, {{ current_user.user }}</p>
<h3>Files</h3>
<table>
<tr>
<th>ID</th>
<th>Filename</th>
<th>Size</th>
<th>Retention</th>
2024-01-05 15:18:55 +01:00
<th>Timestamp</th>
<th>Actions</th>
</tr>
{% for file in files %}
<tr>
<td><a href="https://xygt.cc/{{ file['id'] }}">{{ file['id'] }}</a></td>
<td>{{ file["filename"] }}</td>
2024-01-05 15:18:55 +01:00
<td>{{ file["filesize"] }}mb</td>
<td>{{ file["retention"] }}</td>
2024-01-05 15:18:55 +01:00
<td>{{ file["date"] }}</td>
<td><a href="/{{ file.id }}/delete">Delete</a></td>
</tr>
{% endfor %}
</table>
<br>
<h3>URL's</h3>
<table>
<tr>
<th>ID</th>
<th>URL</th>
<th>Retention</th>
<th>Uploaded</th>
<th>Actions</th>
</tr>
{% for url in urls %}
<tr>
<td><a href="https://xygt.cc/{{ url['id'] }}">{{ url['id'] }}</a></td>
<td>{{ url["url"] }}</td>
<td>{{ url["retention"] }}</td>
<td>{{ url["uploaded"] }}</td>
<td><a href="/{{ url['id'] }}/delete">Delete</a></td>
</tr>
{% endfor %}
</table>
<br>
<h3>Forgot your UserID?</h3>
<p>Click below to view it.</p>
2024-01-05 15:18:55 +01:00
<button onclick="showUserIDandIDPass();">View UserID</button>
<div id="userid" style="display: none;">
<p>Your UserID is: {{ current_user.userid }}</p>
</div>
<br>
<h3>Generate a new IDPass.</h3>
<p>If you've just created an account, lost your IDPass, or believe someone else is using your IDPass, you can reset it here.</p>
<a href="/resetidpass">Reset IDPass</a>
{% endblock %}