summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-05-10 13:43:46 -0700
committerMicah Lee <micah@micahflee.com>2019-05-10 13:43:46 -0700
commit65a7a1790c54f3986d7d6683e06dc1092fff2e6c (patch)
tree0424d42459c8fd035cdc9085c86fc94edd9908ff /share
parentc378a32c51688add225a545bdb96fae24443e9d9 (diff)
downloadonionshare-65a7a1790c54f3986d7d6683e06dc1092fff2e6c.tar.gz
onionshare-65a7a1790c54f3986d7d6683e06dc1092fff2e6c.zip
Starting to refactor website sharing so set_file_info builds a dict of all files, and path_logic will display any arbitrary file, or directory listing if no index.html is present
Diffstat (limited to 'share')
-rw-r--r--share/templates/listing.html25
1 files changed, 16 insertions, 9 deletions
diff --git a/share/templates/listing.html b/share/templates/listing.html
index a514e5d2..8bb4062d 100644
--- a/share/templates/listing.html
+++ b/share/templates/listing.html
@@ -8,11 +8,6 @@
<body>
<header class="clearfix">
- <div class="right">
- <ul>
- <li>Total size: <strong>{{ filesize_human }}</strong></li>
- </ul>
- </div>
<img class="logo" src="/static/img/logo.png" title="OnionShare">
<h1>OnionShare</h1>
</header>
@@ -24,17 +19,29 @@
<th></th>
</tr>
- {% for info in file_info.files %}
+ {% for info in dirs %}
+ <tr>
+ <td>
+ <img width="30" height="30" title="" alt="" src="/static/img/web_folder.png" />
+ <a href="/{{ path }}/{{ info.basename }}">
+ {{ info.basename }}
+ </a>
+ </td>
+ <td></td>
+ </tr>
+ {% endfor %}
+
+ {% for info in files %}
<tr>
<td>
<img width="30" height="30" title="" alt="" src="/static/img/web_file.png" />
- {{ info.basename }}
+ <a href="/{{ path }}/{{ info.basename }}">
+ {{ info.basename }}
+ </a>
</td>
<td>{{ info.size_human }}</td>
- <td><a href="/download/{{ info.basename }}">download</td>
</tr>
{% endfor %}
</table>
- <script src="/static/js/send.js"></script>
</body>
</html>