Add file viwer route
This commit is contained in:
parent
ebfd20da3f
commit
3829abaa03
17 changed files with 179 additions and 14 deletions
37
app/templates/usb-file-viewer.html
Normal file
37
app/templates/usb-file-viewer.html
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>File Name</th>
|
||||
<th>Date modified</th>
|
||||
<th>Download</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for f in render_files %}
|
||||
<tr>
|
||||
<td><img src="{{ f.icon_url}}"></td>
|
||||
{% if f.is_dir %}
|
||||
<td><a href=".{{ f.relative_path}}">{{ f.name}}</a></td>
|
||||
{% endif %}
|
||||
|
||||
{% if f.is_file %}
|
||||
<td>{{ f.name}}</td>
|
||||
{% endif %}
|
||||
|
||||
<td>{{ f.last_modified}}</td>
|
||||
{% if f.is_file %}
|
||||
<td><a href="{{ url_for('serve_file', filepath=f.path) }}">Download</a></td>
|
||||
{% endif %}
|
||||
{% if f.is_dir %}
|
||||
<td></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue