From f8a9f056ed47c8ff86bbd7ebaedd154b358d823e Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Thu, 17 Jun 2021 19:54:09 +1000 Subject: [PATCH] fix bug where back button goes missing if you go into an empty folder --- templates/files.html | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/templates/files.html b/templates/files.html index 04aa576..43d7f4b 100644 --- a/templates/files.html +++ b/templates/files.html @@ -110,10 +110,29 @@ {% if folders or grouping == "None" %}
{% endif %} + + {# rare event of empty folder, still need to show back button #} + {% if folders and entry_data|length == 0 %} + {% if cwd != root %} +
+ + + + +
Back
+
+ {% else %} + {# create an even lighter-grey, unclickable back button - so folders dont jump around when you go into them #} + + + + + {% endif %} + {% endif %} {% for obj in entry_data %} {% if loop.index==1 and folders %} {% if cwd != root %} -
+
@@ -196,7 +215,7 @@ {% endif %} {# if this dir is the toplevel of the cwd, show the folder icon #} {% if dirname| TopLevelFolderOf(cwd) %} -
+
{{obj.name}}