From 1a0fd250315c430efa8b373180ebdaf40939ef4d Mon Sep 17 00:00:00 2001 From: Michael Woods Date: Fri, 26 Dec 2025 14:12:25 -0500 Subject: [PATCH] Applied a fix for the delete button that didn't work. --- packetserver/http/templates/objects.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packetserver/http/templates/objects.html b/packetserver/http/templates/objects.html index fe25933..5e772dd 100644 --- a/packetserver/http/templates/objects.html +++ b/packetserver/http/templates/objects.html @@ -62,7 +62,15 @@ {% for obj in objects %} {{ obj.name }} - {{ "%0.1f KB" | format(obj.size / 1024) if obj.size > 1024 else obj.size ~ " bytes" }} + + {% if obj.size < 1024 %} + {{ obj.size }} bytes + {% elif obj.size < 1048576 %} + {{ "%0.1f" | format(obj.size / 1024) }} KB + {% else %} + {{ "%0.1f" | format(obj.size / 1048576) }} MB + {% endif %} + {% if obj.binary %} Binary @@ -70,7 +78,7 @@ Text {% endif %} - {{ obj.created_at[:10] }} + {{ obj.created_at.strftime('%b %d, %Y') }} {% if obj.private %} Private @@ -78,14 +86,14 @@ Public {% endif %} - + {% if not obj.binary %} - View Text + View Text {% endif %} - Download -
+ Download + - +