From c854b65e8b40385262b01f13a23d573c166d8b8f Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 5 May 2023 07:16:05 +0300 Subject: [PATCH] add name sort to marseys and disable clicking on "marsey" and "original file" --- files/routes/static.py | 4 +++- files/templates/marseys.html | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 2851bec6b..ae02a865d 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -58,8 +58,10 @@ def marseys(v:User): sort = request.values.get("sort") if sort == "author": marseys = marseys.order_by(User.username, Emoji.count.desc()) + elif sort == "name": + marseys = marseys.order_by(Emoji.name, Emoji.count.desc()) elif sort == "added_on": - marseys = marseys.order_by(nullslast(Emoji.created_utc.desc()), User.username) + marseys = marseys.order_by(nullslast(Emoji.created_utc.desc()), Emoji.count.desc()) else: # implied sort == "usage" marseys = marseys.order_by(Emoji.count.desc(), User.username) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index d04302b23..4e6e04ee6 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -5,15 +5,15 @@
- - + + {% if FEATURES['ASSET_SUBMISSIONS'] %} {% endif %} {% if FEATURES['ASSET_SUBMISSIONS'] %} - + {% endif %}
NameMarseyNameMarsey UsageAuthorAdded onOriginal FileOriginal File