From 4dffbe4c69c355ad15c2c04fd4f683ae3e6d9f7e Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 10 Oct 2021 05:42:12 +0200 Subject: [PATCH] sdffds --- files/routes/search.py | 8 ++++++-- files/templates/authforms.html | 6 +++--- files/templates/comments.html | 2 +- files/templates/default.html | 6 +++--- files/templates/header.html | 12 ++---------- files/templates/log.html | 6 +++--- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/settings.html | 4 ++-- files/templates/settings2.html | 4 ++-- files/templates/settings_css.html | 2 +- files/templates/settings_profile.html | 2 +- files/templates/settings_profilecss.html | 2 +- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submission.html | 9 ++------- files/templates/submit.html | 6 +++--- files/templates/userpage.html | 20 ++++---------------- 18 files changed, 38 insertions(+), 59 deletions(-) diff --git a/files/routes/search.py b/files/routes/search.py index 49f600e0e..8ab716f2f 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -185,7 +185,7 @@ def searchcomments(v): try: page = max(1, int(request.values.get("page", 1))) except: page = 1 - sort = request.values.get("sort", "top").lower() + sort = request.values.get("sort", "new").lower() t = request.values.get('t', 'all').lower() criteria=searchparse(query) @@ -203,6 +203,10 @@ def searchcomments(v): words=tuple(words) comments=comments.filter(*words) + if 'over18' in criteria: comments = comments.filter(Comment.over_18==True) + + if 'author' in criteria: comments = comments.filter(Comment.author_id == get_user(criteria['author']).id) + if not(v and v.admin_level >= 3): comments = comments.filter( Comment.deleted_utc == 0, @@ -262,7 +266,7 @@ def searchusers(v): query = request.values.get("q", '').strip() page = max(1, int(request.values.get("page", 1))) - sort = request.values.get("sort", "top").lower() + sort = request.values.get("sort", "new").lower() t = request.values.get('t', 'all').lower() term=query.lstrip('@') term=term.replace('\\','') diff --git a/files/templates/authforms.html b/files/templates/authforms.html index a2fe927dd..f3cba1821 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,11 +15,11 @@ {% if v %} - - {% if v.agendaposter %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} diff --git a/files/templates/comments.html b/files/templates/comments.html index 9c983b306..66a892a1c 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -100,7 +100,7 @@ diff --git a/files/templates/default.html b/files/templates/default.html index 5fd337d41..34206d0c3 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -250,12 +250,12 @@ {% if v %} - + - {% if v.agendaposter %}{% endif %} + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} {% endblock %} diff --git a/files/templates/header.html b/files/templates/header.html index 55ac80509..c1e6de661 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -115,11 +115,7 @@
Android app - {% if "rama" in request.host %} - Rules - {% else %} - Rules - {% endif %} + Rules Changelog @@ -180,11 +176,7 @@ Android app - {% if "rama" in request.host %} - Rules - {% else %} - Rules - {% endif %} + Rules Source code diff --git a/files/templates/log.html b/files/templates/log.html index 94e70d9bd..da4601eda 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -17,11 +17,11 @@ {% if v %} - - {% if v.agendaposter %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %}
diff --git a/files/templates/login.html b/files/templates/login.html index 954a1abbc..fcc558749 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -15,7 +15,7 @@ - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index ce94f70de..c59a1ec82 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -12,7 +12,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index c51c50763..0e801027e 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -55,8 +55,8 @@ - - {% if v.agendaposter %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} diff --git a/files/templates/settings2.html b/files/templates/settings2.html index 035e31c9e..bf8e8edc9 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -40,10 +40,10 @@ {% if v %} - + {% else %} - + {% endif %} diff --git a/files/templates/settings_css.html b/files/templates/settings_css.html index 4d1cec990..f530d92f7 100644 --- a/files/templates/settings_css.html +++ b/files/templates/settings_css.html @@ -21,7 +21,7 @@
- Limit of 50000 characters + Limit of 4000 characters
diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 3b8653318..b45c68fa2 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -6,7 +6,7 @@ {% include "emoji_modal.html" %} {% include "gif_modal.html" %} - +
diff --git a/files/templates/settings_profilecss.html b/files/templates/settings_profilecss.html index eb1356a2b..b18c680a3 100644 --- a/files/templates/settings_profilecss.html +++ b/files/templates/settings_profilecss.html @@ -21,7 +21,7 @@ - Limit of 50000 characters + Limit of 4000 characters
diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index a29b35e56..f1f7685e8 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -36,7 +36,7 @@ - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index 4fdc9758f..0b0fc8619 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -31,7 +31,7 @@ - + diff --git a/files/templates/submission.html b/files/templates/submission.html index 90a23f4b3..bf7696178 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -667,12 +667,7 @@
- Comment + Comment
@@ -682,7 +677,7 @@
{% if p.comment_count >= 2 %} -
+
Jump in the discussion.

No email address required.

diff --git a/files/templates/submit.html b/files/templates/submit.html index f006cba1b..742dc5671 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -25,11 +25,11 @@ {% block stylesheets %} {% if v %} - - {% if v.agendaposter %}{% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - + {% endif %} {% endblock %} diff --git a/files/templates/userpage.html b/files/templates/userpage.html index bca5d1b55..9fe5960f7 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -1,26 +1,14 @@ {% extends "default.html" %} -{% if u and u.profilecss %} - {% block stylesheets %} - {% if v %} - - - {% if v.agendaposter %}{% endif %} - {% else %} - - - {% endif %} - {% if u and u.profilecss %} - - {% endif %} - {% endblock %} -{% endif %} - {% block pagetype %}userpage{% endblock %} {% block title %} +{% if u and u.profilecss %} + +{% endif %} +