51 lines
1.7 KiB
Plaintext
51 lines
1.7 KiB
Plaintext
{% extends 'layouts/base.njk' %}
|
|
|
|
{% set title = app.name + ' - File manager' %}
|
|
|
|
{% block scripts %}
|
|
<script src="/js/fm.js"></script>
|
|
{% endblock %}
|
|
|
|
{% block body %}
|
|
<h1>File manager</h1>
|
|
<p>You're their manager, please be nice with them.</p>
|
|
|
|
<section class="panel">
|
|
<h2>File list</h2>
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>#</th>
|
|
<th>URL</th>
|
|
<th>Name</th>
|
|
<th>Size</th>
|
|
<th>Expires at</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for file in files %}
|
|
<tr>
|
|
<td>{{ file.id }}</td>
|
|
<td>
|
|
<div class="copyable-text">
|
|
<a class="content" href="{{ file.getURL() }}" target="_blank">{{ file.getURL() }}</a>
|
|
<button class="copy-button"><i data-feather="copy"></i></button>
|
|
</div>
|
|
</td>
|
|
<td>{{ file.real_name }}</td>
|
|
<td>{{ (file.size / (1024 * 1024)).toFixed(2) }}MB</td>
|
|
{% set expires_at = file.getExpirationDate() %}
|
|
<td>{% if expires_at %}{{ expires_at.toISOString() }}{% else %}Never{% endif %}</td>
|
|
<td>
|
|
<form action="{{ route('delete-file-frontend', file.slug) }}" method="post">
|
|
<button class="button danger"><i data-feather="trash"></i> Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
{% endblock %} |