From 3c79c3c6887514d321205a766db5ee697cb07115 Mon Sep 17 00:00:00 2001 From: Michael Rodin Date: Fri, 20 Oct 2023 13:13:22 +0200 Subject: [PATCH] Small QoL improvements --- flask/app.py | 2 +- flask/func.py | 2 +- flask/templates/search.html | 10 +++++----- flask/templates/view.html | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/flask/app.py b/flask/app.py index 3e33cf5..fa03818 100644 --- a/flask/app.py +++ b/flask/app.py @@ -172,7 +172,7 @@ def searchpage(): ## FUNCTIONS def errorpage(message): - return "

ERROR: " + message + "

Go back and try again" + return "

ERROR: " + str(message) + "

Go back and try again" ## Checks if given sesskey is valid and returns user data ## OUTPUT: (if sesskey valid) logged_in:bool=True, userdata:tuple diff --git a/flask/func.py b/flask/func.py index 63352a5..ad5acda 100644 --- a/flask/func.py +++ b/flask/func.py @@ -25,7 +25,7 @@ class db: ID int PRIMARY KEY AUTO_INCREMENT, NAME text NOT NULL, HASH text NOT NULL UNIQUE, - SIZE int NOT NULL, + SIZE bigint NOT NULL, IMPORTED int, CATEGORY int, OWNER int diff --git a/flask/templates/search.html b/flask/templates/search.html index 347a1cd..171d52a 100644 --- a/flask/templates/search.html +++ b/flask/templates/search.html @@ -10,17 +10,17 @@
Sort by:
Category:
diff --git a/flask/templates/view.html b/flask/templates/view.html index 8cf5627..09c0e94 100644 --- a/flask/templates/view.html +++ b/flask/templates/view.html @@ -5,12 +5,12 @@ {% endblock %} {% block content %} -{% if login and userdata[0] == archive[8] %}{% endif %}

{{archive[1]}}

+{% if login and userdata[0] == archive[8] %}{% endif %}

{{archive[1]}}

Hash: {{archive[2]}} Owner: {{archive[-1]}} - Category: {{category[4]}}/{{category[1]}} + Category: {{category[4]}}/{{category[1]}} Imported: {{archive[4]|ctime}} Size: {{archive[4]|spacer}} Labels: {% if login and userdata[0] == archive[8] %}Edit{% endif %}