From f458f0bcd40ad545b8dd17810b0993160769bf69 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 11:33:55 +0200 Subject: [PATCH 01/30] fsd --- files/templates/home.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/home.html b/files/templates/home.html index 18330d9b4..91c82f5be 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -99,7 +99,7 @@
-
SUBMIT DRAMA!
+
CREATE A POST
  • From 1c8f30ec1ee7cec52e646f451a496559da3fe08c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:32:31 +0200 Subject: [PATCH 02/30] fds --- files/routes/admin.py | 39 ++++++++++++++--- files/routes/awards.py | 32 +++++++------- files/routes/login.py | 4 -- files/routes/settings.py | 4 -- files/routes/static.py | 7 ++-- files/templates/admin/alt_votes.html | 2 +- files/templates/admin/banned_domains.html | 2 +- files/templates/admin/content_stats.html | 2 +- files/templates/{ => admin}/shadowbanned.html | 10 +++-- files/templates/admins.html | 14 ++++--- files/templates/agendaposters.html | 4 +- files/templates/authforms.html | 4 +- files/templates/badges.html | 2 +- files/templates/banned.html | 6 +-- files/templates/blocks.html | 6 +-- files/templates/default.html | 4 +- files/templates/emoji_modal.html | 2 +- files/templates/followers.html | 4 +- files/templates/following.html | 4 +- files/templates/formatting.html | 8 ++-- files/templates/grassed.html | 4 +- files/templates/header.html | 2 +- files/templates/leaderboard.html | 42 +++++++++---------- files/templates/log.html | 4 +- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/patrons.html | 4 +- files/templates/rentoids.html | 4 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 4 +- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 4 +- files/templates/thiefs.html | 12 +++--- files/templates/userpage.html | 4 +- files/templates/userpage_blocked.html | 2 +- files/templates/userpage_blocking.html | 2 +- files/templates/viewers.html | 4 +- files/templates/voters.html | 4 +- files/templates/votes.html | 8 ++-- 40 files changed, 149 insertions(+), 125 deletions(-) rename files/templates/{ => admin}/shadowbanned.html (69%) diff --git a/files/routes/admin.py b/files/routes/admin.py index b053a1bbe..c8ceb54f7 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -27,6 +27,33 @@ if SITE_NAME == 'PCM': cc = "splash mountain" else: cc = "country club" month = datetime.now().strftime('%B') +@app.post("/@/make_admin") +@limiter.limit("1/second") +@admin_level_required(3) +@validate_formkey +def make_admin(v, username): + if request.host == 'rdrama.net': abort(403) + user = get_user(username) + if not user: abort(404) + user.admin_level = 2 + g.db.add(user) + g.db.commit() + return {"message": "User has been made admin!"} + + +@app.post("/@/remove_admin") +@limiter.limit("1/second") +@admin_level_required(3) +@validate_formkey +def remove_admin(v, username): + if request.host == 'rdrama.net': abort(403) + user = get_user(username) + if not user: abort(404) + user.admin_level = 0 + g.db.add(user) + g.db.commit() + return {"message": "Admin removed!"} + @app.get("/admin/grassed") @admin_level_required(2) @@ -258,12 +285,11 @@ def shadowbanned(v): users = [x for x in g.db.query(User).filter(User.shadowbanned != None).all()] if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' - return render_template(f"{template}shadowbanned.html", v=v, users=users) + return render_template(f"{template}admin/shadowbanned.html", v=v, users=users) -@app.get("/admin/agendaposters") -@auth_required +@app.get("/agendaposters") +@auth_desired def agendaposters(v): - if not (v and v.admin_level > 1): abort(404) users = [x for x in g.db.query(User).filter_by(agendaposter = True).all()] if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' @@ -404,8 +430,9 @@ def badge_grant_post(v): g.db.add(new_badge) - text = f"@{v.username} has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}" - send_notification(user.id, text) + if v.id != user.id: + text = f"@{v.username} has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}" + send_notification(user.id, text) g.db.commit() return render_template(f"{template}admin/badge_grant.html", v=v, badge_types=BADGES, msg="Badge granted!") diff --git a/files/routes/awards.py b/files/routes/awards.py index e3b011c50..6f6c17d97 100644 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -213,12 +213,11 @@ def award_post(pid, v): post_award.submission_id = post.id g.db.add(post_award) - msg = f"@{v.username} has given your [post]({post.permalink}) the {AWARDS[kind]['title']} Award!" - - note = request.values.get("note", "").strip() - if note: msg += f"\n\n> {note}" - - send_repeatable_notification(post.author.id, msg) + if v.id != post.author.id: + msg = f"@{v.username} has given your [post]({post.permalink}) the {AWARDS[kind]['title']} Award!" + note = request.values.get("note", "").strip() + if note: msg += f"\n\n> {note}" + send_repeatable_notification(post.author.id, msg) author = post.author if kind == "ban": @@ -379,12 +378,12 @@ def award_comment(cid, v): comment_award.comment_id = c.id g.db.add(comment_award) - msg = f"@{v.username} has given your [comment]({c.permalink}) the {AWARDS[kind]['title']} Award!" + if v.id != c.author.id: + msg = f"@{v.username} has given your [comment]({c.permalink}) the {AWARDS[kind]['title']} Award!" + note = request.values.get("note", "").strip() + if note: msg += f"\n\n> {note}" + send_repeatable_notification(c.author.id, msg) - note = request.values.get("note", "").strip() - if note: msg += f"\n\n> {note}" - - send_repeatable_notification(c.author.id, msg) author = c.author if kind == "ban": @@ -554,12 +553,11 @@ def admin_userawards_post(v): g.db.add(award) - text = "You were given the following awards:\n\n" - - for key, value in notify_awards.items(): - text += f" - **{value}** {AWARDS[key]['title']} {'Awards' if value != 1 else 'Award'}\n" - - send_repeatable_notification(u.id, text) + if v.id != u.id: + text = "You were given the following awards:\n\n" + for key, value in notify_awards.items(): + text += f" - **{value}** {AWARDS[key]['title']} {'Awards' if value != 1 else 'Award'}\n" + send_repeatable_notification(u.id, text) note = "" diff --git a/files/routes/login.py b/files/routes/login.py index fd48dca31..723adab04 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -389,8 +389,6 @@ def get_reset(): user_id = request.values.get("id") - if user_id == PW_ID: abort(403) - timestamp = int(request.values.get("time",0)) token = request.values.get("token") @@ -426,8 +424,6 @@ def post_reset(v): user_id = request.values.get("user_id") - if user_id == PW_ID: abort(403) - timestamp = int(request.values.get("time")) token = request.values.get("token") diff --git a/files/routes/settings.py b/files/routes/settings.py index 88e95b197..44e9d45fd 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -580,8 +580,6 @@ def verifiedcolor(v): @validate_formkey def settings_security_post(v): if request.values.get("new_password"): - if v.id == PW_ID: abort(403) - if request.values.get("new_password") != request.values.get("cnf_password"): return render_template("settings_security.html", v=v, error="Passwords do not match.") @@ -633,8 +631,6 @@ def settings_security_post(v): return render_template("settings_security.html", v=v, error="Check your email and click the verification link to complete the email change.") if request.values.get("2fa_token"): - if v.id == PW_ID: abort(403) - if not v.verifyPass(request.values.get('password')): return render_template("settings_security.html", v=v, error="Invalid password or token.") diff --git a/files/routes/static.py b/files/routes/static.py index af2c058c1..1cb6a7870 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -41,7 +41,8 @@ def participation_stats(v): day = now - 86400 - data = {"valid_users": g.db.query(User.id).count(), + data = {"marseys": len(marseys), + "valid_users": g.db.query(User.id).count(), "private_users": g.db.query(User.id).filter_by(is_private=True).count(), "banned_users": g.db.query(User.id).filter(User.is_banned > 0).count(), "verified_email_users": g.db.query(User.id).filter_by(is_activated=True).count(), @@ -102,10 +103,10 @@ def cached_chart(days): if days > 31: file = "/weekly_chart.png" - day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(31)][1:] + day_cutoffs = [today_cutoff - 86400 * 7 * i for i in range(35)][1:] else: file = "/daily_chart.png" - day_cutoffs = [today_cutoff - 86400 * i for i in range(31)][1:] + day_cutoffs = [today_cutoff - 86400 * i for i in range(35)][1:] day_cutoffs.insert(0, calendar.timegm(now)) diff --git a/files/templates/admin/alt_votes.html b/files/templates/admin/alt_votes.html index 0c6cbc472..79a1ed723 100644 --- a/files/templates/admin/alt_votes.html +++ b/files/templates/admin/alt_votes.html @@ -27,7 +27,7 @@ -
    +
    diff --git a/files/templates/admin/banned_domains.html b/files/templates/admin/banned_domains.html index bac049522..ce584bf51 100644 --- a/files/templates/admin/banned_domains.html +++ b/files/templates/admin/banned_domains.html @@ -10,7 +10,7 @@ -
    +
    diff --git a/files/templates/admin/content_stats.html b/files/templates/admin/content_stats.html index 2299101a3..9e964fe4b 100644 --- a/files/templates/admin/content_stats.html +++ b/files/templates/admin/content_stats.html @@ -7,7 +7,7 @@ {% block content %}
    
    -
    Domain
    +
    diff --git a/files/templates/shadowbanned.html b/files/templates/admin/shadowbanned.html similarity index 69% rename from files/templates/shadowbanned.html rename to files/templates/admin/shadowbanned.html index 005f57722..5e5787cde 100644 --- a/files/templates/shadowbanned.html +++ b/files/templates/admin/shadowbanned.html @@ -1,18 +1,20 @@ {% extends "settings2.html" %} {% block content %} -
    Statistic
    + + +
    - - + + {% for user in users %} - + {% endfor %} diff --git a/files/templates/admins.html b/files/templates/admins.html index 3b1d6ef01..92d577f23 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -3,22 +3,26 @@ {% block pagetitle %}Admins{% endblock %} {% block content %} + + +
    Admins
    
    -
    #NameShadowbanned byNameShadowbanned by
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}@{{user.username}}'s profile picture{{user.username}} {{user.shadowbanned}}
    +
    +
    - - - + + + {% for user in admins %} - + diff --git a/files/templates/agendaposters.html b/files/templates/agendaposters.html index 72dfd41a0..aeea1e379 100644 --- a/files/templates/agendaposters.html +++ b/files/templates/agendaposters.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} -
    #NameTruescoreMod actionsNameTruescoreMod actions
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}{% if user.admin_level == 1 and v and v.admin_level > 1 %}{% endif %}@{{user.username}}'s profile picture{{user.username}}{% if user.admin_level == 1 and v and v.admin_level > 1 %}{% endif %} {{user.truecoins}} {{user.modaction_num}}
    +
    @@ -11,7 +11,7 @@ {% for user in users %} - + {% endfor %}
    #
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}@{{user.username}}'s profile picture{{user.username}}
    diff --git a/files/templates/authforms.html b/files/templates/authforms.html index a85aa3e35..13ee53cba 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/badges.html b/files/templates/badges.html index 2ef67c8b9..2a13b1147 100644 --- a/files/templates/badges.html +++ b/files/templates/badges.html @@ -10,7 +10,7 @@ -
    +
    diff --git a/files/templates/banned.html b/files/templates/banned.html index 4a5f32a34..a54b02087 100644 --- a/files/templates/banned.html +++ b/files/templates/banned.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} -
    Name
    +
    @@ -13,9 +13,9 @@ {% for user in users %} - + - + {% endfor %}
    #
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}@{{user.username}}'s profile picture{{user.username}} {% if user.ban_reason %}{{user.ban_reason}}{% endif %}@{{user.banned_by.username}}'s profile picture{{user.banned_by.username}}@{{user.banned_by.username}}'s profile picture{{user.banned_by.username}}
    diff --git a/files/templates/blocks.html b/files/templates/blocks.html index 236a1ec3e..9e19c2633 100644 --- a/files/templates/blocks.html +++ b/files/templates/blocks.html @@ -5,7 +5,7 @@ {% block content %}

    Blocks

    
    -
    +
    @@ -14,8 +14,8 @@ {% for user in users %} - - + + {% endfor %}
    User
    {{user.username}}{{targets[loop.index-1].username}}{{user.username}}{{targets[loop.index-1].username}}
    diff --git a/files/templates/default.html b/files/templates/default.html index 50f166d71..1c09e3476 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index 7b3e5642b..eb076e80e 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -80,7 +80,7 @@
    - + - + {% if v.agendaposter %} - + {% endif %}
    diff --git a/files/templates/login.html b/files/templates/login.html index a3c594501..fc8d4b1d0 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 151009799..37aa5caa0 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/patrons.html b/files/templates/patrons.html index 60663ca2c..719bf6d00 100644 --- a/files/templates/patrons.html +++ b/files/templates/patrons.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} -
    +
    @@ -12,7 +12,7 @@ {% for u in users %} - + diff --git a/files/templates/rentoids.html b/files/templates/rentoids.html index e7d5ba12d..acc075cd5 100644 --- a/files/templates/rentoids.html +++ b/files/templates/rentoids.html @@ -3,7 +3,7 @@
    Rentoids
    
    -
    #
    {{loop.index}}@{{u.username}}'s profile picture{{u.username}}@{{u.username}}'s profile picture{{u.username}} Patron-{{u.patron}}
    +
    @@ -13,7 +13,7 @@ {% for user in users %} - + {% endfor %}
    #
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}@{{user.username}}'s profile picture{{user.username}}
    diff --git a/files/templates/settings.html b/files/templates/settings.html index 38cd1a8a5..722a1cc10 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index c5ab9b3fc..3f6613cf9 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index 53f5a8d56..5dbe6ed50 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index 60c6343ce..8ae479880 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} diff --git a/files/templates/thiefs.html b/files/templates/thiefs.html index 18be36ba2..768ff99d4 100644 --- a/files/templates/thiefs.html +++ b/files/templates/thiefs.html @@ -3,7 +3,7 @@
    
     
    Successful thiefs
    
    -
    +
    @@ -13,7 +13,7 @@ {% for user in successful %} - + {% endfor %}
    #
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}@{{user.username}}'s profile picture{{user.username}}
    @@ -21,7 +21,7 @@
    
     
    Evicted thiefs
    
    -
    +
    @@ -31,7 +31,7 @@ {% for user in failed2 %} - + {% endfor %}
    #
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}@{{user.username}}'s profile picture{{user.username}}
    @@ -39,7 +39,7 @@
    
     
    Jailed thiefs
    
    -
    +
    @@ -49,7 +49,7 @@ {% for user in failed %} - + {% endfor %}
    #
    {{loop.index}}@{{user.username}}'s profile picture{{user.username}}@{{user.username}}'s profile picture{{user.username}}
    diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 35b0170c7..67be90191 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -53,7 +53,7 @@ {% if u.unban_utc %}
    {{u.unban_string}}
    {% endif %} {% endif %}
    -

    {{u.username}}

    +

    {{u.username}}

    {% if u.username != u.original_username %} @@ -352,7 +352,7 @@ {% if u.unban_utc %}
    {{u.unban_string}}
    {% endif %} {% endif %} {% if u.verified %} {% endif %} -

    {{u.username}}

    +

    {{u.username}}

    {% if u.username != u.original_username %} diff --git a/files/templates/userpage_blocked.html b/files/templates/userpage_blocked.html index 7ef98a17a..cdd9ea337 100644 --- a/files/templates/userpage_blocked.html +++ b/files/templates/userpage_blocked.html @@ -6,7 +6,7 @@ {% endblock %} {% block title %} -<span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}};"{% endif %}>{{u.username}}</span> +<span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}}"{% endif %}>{{u.username}}</span> {% endblock %} diff --git a/files/templates/userpage_blocking.html b/files/templates/userpage_blocking.html index 0d6d9f5ba..9c2c3dc3a 100644 --- a/files/templates/userpage_blocking.html +++ b/files/templates/userpage_blocking.html @@ -6,7 +6,7 @@ {% endblock %} {% block title %} -<span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}};"{% endif %}>{{u.username}}</span> +<span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}}"{% endif %}>{{u.username}}</span> {% endblock %} diff --git a/files/templates/viewers.html b/files/templates/viewers.html index 40a810bfa..5fb11ff2b 100644 --- a/files/templates/viewers.html +++ b/files/templates/viewers.html @@ -3,7 +3,7 @@
    
     
    Users who viewed your profile
    
    -
    +
    @@ -12,7 +12,7 @@ {% for view in viewers %} - + {% endfor %} diff --git a/files/templates/voters.html b/files/templates/voters.html index 8db287868..4ae5e9c49 100644 --- a/files/templates/voters.html +++ b/files/templates/voters.html @@ -6,7 +6,7 @@
    {{name2}}
    
    -
    Name
    @{{view.viewer.username}}'s profile picture{{view.viewer.username}}@{{view.viewer.username}}'s profile picture{{view.viewer.username}} {{view.last_view_string}}
    +
    @@ -18,7 +18,7 @@ {% for user in users %} - + {% endfor %} diff --git a/files/templates/votes.html b/files/templates/votes.html index 99ea86fba..d8c0988cc 100644 --- a/files/templates/votes.html +++ b/files/templates/votes.html @@ -19,20 +19,20 @@

    Downvotes: {{downs | length}}

    Upvotes

    -
    #
    {{loop.index}}@{{user[0].username}}'s profile picture{{user[0].username}}@{{user[0].username}}'s profile picture{{user[0].username}} {{user[1]}}
    +
    {% for vote in ups %} - + {% endfor %}
    User
    @{{vote.user.username}}'s profile picture{{vote.user.username}}
    @{{vote.user.username}}'s profile picture{{vote.user.username}}

    Downvotes

    -
    +
    {% for vote in downs %} - + {% endfor %}
    User
    @{{vote.user.username}}'s profile picture{{vote.user.username}}
    @{{vote.user.username}}'s profile picture{{vote.user.username}}
    From 76e80e9e4c125dd6d3704ccd7e231db909feabe4 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:33:16 +0200 Subject: [PATCH 03/30] fds --- files/routes/admin.py | 2 +- files/templates/{admin => }/shadowbanned.html | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename files/templates/{admin => }/shadowbanned.html (100%) diff --git a/files/routes/admin.py b/files/routes/admin.py index c8ceb54f7..58e3ffbe6 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -285,7 +285,7 @@ def shadowbanned(v): users = [x for x in g.db.query(User).filter(User.shadowbanned != None).all()] if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' - return render_template(f"{template}admin/shadowbanned.html", v=v, users=users) + return render_template(f"{template}shadowbanned.html", v=v, users=users) @app.get("/agendaposters") @auth_desired diff --git a/files/templates/admin/shadowbanned.html b/files/templates/shadowbanned.html similarity index 100% rename from files/templates/admin/shadowbanned.html rename to files/templates/shadowbanned.html From dbfc25b5f790c659f9f0756594045ad91f5cd3aa Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:39:41 +0200 Subject: [PATCH 04/30] fsdfs --- files/routes/admin.py | 18 ------------------ files/routes/login.py | 8 ++------ files/routes/users.py | 19 +++++++++++++++++++ files/templates/admin/admin_home.html | 4 ++-- files/templates/grassed.html | 9 ++++++--- files/templates/shadowbanned.html | 7 ++++--- 6 files changed, 33 insertions(+), 32 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 58e3ffbe6..6d5a273c6 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -54,16 +54,6 @@ def remove_admin(v, username): g.db.commit() return {"message": "Admin removed!"} - -@app.get("/admin/grassed") -@admin_level_required(2) -def grassed(v): - users = g.db.query(User).filter(User.ban_reason.like('grass award used by @%')).all() - - if not v or v.oldsite: template = '' - else: template = 'CHRISTMAS/' - return render_template(f"{template}grassed.html", v=v, users=users) - @app.post("/distribute/") @limiter.limit("1/second") @admin_level_required(3) @@ -287,14 +277,6 @@ def shadowbanned(v): else: template = 'CHRISTMAS/' return render_template(f"{template}shadowbanned.html", v=v, users=users) -@app.get("/agendaposters") -@auth_desired -def agendaposters(v): - users = [x for x in g.db.query(User).filter_by(agendaposter = True).all()] - if not v or v.oldsite: template = '' - else: template = 'CHRISTMAS/' - return render_template(f"{template}agendaposters.html", v=v, users=users) - @app.get("/admin/image_posts") @admin_level_required(2) diff --git a/files/routes/login.py b/files/routes/login.py index 723adab04..19aac3c64 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -186,9 +186,7 @@ def sign_up_get(v): ref_user = None if ref_user and (ref_user.id in session.get("history", [])): - if not v or v.oldsite: template = '' - else: template = 'CHRISTMAS/' - return render_template(f"{template}sign_up_failed_ref.html") + return render_template(f"sign_up_failed_ref.html") now = int(time.time()) token = token_hex(16) @@ -203,9 +201,7 @@ def sign_up_get(v): redir = request.values.get("redirect", "/").replace("/logged_out", "").strip() - if not v or v.oldsite: template = '' - else: template = 'CHRISTMAS/' - return render_template(f"{template}sign_up.html", + return render_template(f"sign_up.html", formkey=formkey, now=now, redirect=redir, diff --git a/files/routes/users.py b/files/routes/users.py index 90fb0b230..b37d59cae 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -18,6 +18,25 @@ site = environ.get("DOMAIN").strip() beams_client = PushNotifications(instance_id=PUSHER_INSTANCE_ID, secret_key=PUSHER_KEY) + +@app.get("/grassed") +@auth_desired +def grassed(v): + users = g.db.query(User).filter(User.ban_reason.like('grass award used by @%')).all() + + if not v or v.oldsite: template = '' + else: template = 'CHRISTMAS/' + return render_template(f"{template}grassed.html", v=v, users=users) + +@app.get("/agendaposters") +@auth_desired +def agendaposters(v): + users = [x for x in g.db.query(User).filter_by(agendaposter = True).all()] + if not v or v.oldsite: template = '' + else: template = 'CHRISTMAS/' + return render_template(f"{template}agendaposters.html", v=v, users=users) + + @app.get("/@/upvoters") @auth_desired def upvoters(v, username): diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index d48cbbe9a..31f6cff11 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -23,8 +23,8 @@

    Safety

    diff --git a/files/templates/grassed.html b/files/templates/grassed.html index d05554e1d..0fd088937 100644 --- a/files/templates/grassed.html +++ b/files/templates/grassed.html @@ -1,12 +1,15 @@ {% extends "settings2.html" %} {% block content %} -
    + + +
    +
    - - + + {% for user in users %} diff --git a/files/templates/shadowbanned.html b/files/templates/shadowbanned.html index 5e5787cde..5ef23c490 100644 --- a/files/templates/shadowbanned.html +++ b/files/templates/shadowbanned.html @@ -3,12 +3,13 @@ {% block content %} -
    #NameGrasserNameGrasser
    +
    +
    - - + + {% for user in users %} From c571f935194b5a22056e958e34bc75a156d69bca Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:41:07 +0200 Subject: [PATCH 05/30] gfgf --- files/templates/admins.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/templates/admins.html b/files/templates/admins.html index 92d577f23..2e887eed8 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -14,9 +14,9 @@ - - - + + + {% for user in admins %} From a5ae566e4c1143012b3f6b62c254bf2eb8b5f1de Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:44:13 +0200 Subject: [PATCH 06/30] fdsdsf --- files/templates/admins.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/templates/admins.html b/files/templates/admins.html index 2e887eed8..92d577f23 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -14,9 +14,9 @@ - - - + + + {% for user in admins %} From 19e11e0a89224a104a1d511ad843a58858091133 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:48:15 +0200 Subject: [PATCH 07/30] fds --- files/templates/admins.html | 6 +++--- files/templates/grassed.html | 2 +- files/templates/shadowbanned.html | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/templates/admins.html b/files/templates/admins.html index 92d577f23..3e6b1d97a 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -4,7 +4,7 @@ {% block content %} - +
    
     
    Admins
    @@ -15,8 +15,8 @@
    - - + + {% for user in admins %} diff --git a/files/templates/grassed.html b/files/templates/grassed.html index 0fd088937..bf8cf0a78 100644 --- a/files/templates/grassed.html +++ b/files/templates/grassed.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} - +
    #NameShadowbanned byNameShadowbanned by
    #NameTruescoreMod actionsNameTruescoreMod actions
    #NameTruescoreMod actionsNameTruescoreMod actions
    # NameTruescoreMod actionsTruescoreMod actions
    diff --git a/files/templates/shadowbanned.html b/files/templates/shadowbanned.html index 5ef23c490..1c66510fb 100644 --- a/files/templates/shadowbanned.html +++ b/files/templates/shadowbanned.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} - +
    From a6f398137a31f621ce917c9cfc7f82112c406cdb Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:55:35 +0200 Subject: [PATCH 08/30] fds --- files/helpers/const.py | 2 ++ files/routes/admin.py | 2 +- files/templates/admins.html | 2 +- files/templates/grassed.html | 8 +++----- files/templates/marseys.html | 2 +- files/templates/shadowbanned.html | 7 +++---- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 50402f022..162b0924a 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -19,6 +19,8 @@ for k, val in result.items(): del result +marseys = dict(sorted(marseys.items(), key=lambda x: x[1])) + if SITE == 'rdrama.net': topmakers = {} for k, val in marseys.items(): diff --git a/files/routes/admin.py b/files/routes/admin.py index 6d5a273c6..954f36b66 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -272,7 +272,7 @@ def post_sidebar(v): @auth_required def shadowbanned(v): if not (v and v.admin_level > 1): abort(404) - users = [x for x in g.db.query(User).filter(User.shadowbanned != None).all()] + users = [x for x in g.db.query(User).filter(User.shadowbanned != None).order_by(User.shadowbanned).all()] if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' return render_template(f"{template}shadowbanned.html", v=v, users=users) diff --git a/files/templates/admins.html b/files/templates/admins.html index 3e6b1d97a..80bd42cb4 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -14,7 +14,7 @@ - + diff --git a/files/templates/grassed.html b/files/templates/grassed.html index bf8cf0a78..179428eed 100644 --- a/files/templates/grassed.html +++ b/files/templates/grassed.html @@ -1,15 +1,13 @@ {% extends "settings2.html" %} {% block content %} - -
    -
    #NameName Truescore Mod actions
    +
    - - + + {% for user in users %} diff --git a/files/templates/marseys.html b/files/templates/marseys.html index 9d687609c..9fb5ec177 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -4,7 +4,7 @@ -
    #NameGrasserNameGrasser
    +
    diff --git a/files/templates/shadowbanned.html b/files/templates/shadowbanned.html index 1c66510fb..4e2aea419 100644 --- a/files/templates/shadowbanned.html +++ b/files/templates/shadowbanned.html @@ -1,15 +1,14 @@ {% extends "settings2.html" %} {% block content %} -
    -
    #
    +
    - - + + {% for user in users %} From 889fe19b48b99380b55b926be42f8bb01dd989b5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:57:43 +0200 Subject: [PATCH 09/30] fds --- files/routes/login.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/login.py b/files/routes/login.py index 19aac3c64..223801b76 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -186,7 +186,7 @@ def sign_up_get(v): ref_user = None if ref_user and (ref_user.id in session.get("history", [])): - return render_template(f"sign_up_failed_ref.html") + return render_template("sign_up_failed_ref.html") now = int(time.time()) token = token_hex(16) @@ -201,7 +201,7 @@ def sign_up_get(v): redir = request.values.get("redirect", "/").replace("/logged_out", "").strip() - return render_template(f"sign_up.html", + return render_template("sign_up.html", formkey=formkey, now=now, redirect=redir, From f2bc4b0a31ecebf780a774a06b58f5c732de0996 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:58:38 +0200 Subject: [PATCH 10/30] fds --- files/templates/marseys.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/marseys.html b/files/templates/marseys.html index 9fb5ec177..e374b01ce 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -4,7 +4,7 @@ -
    #NameShadowbanned byNameShadowbanned by
    +
    From 18d10f4375b275f237e21e134ae5dd1b15bc39e1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 12:59:29 +0200 Subject: [PATCH 11/30] fsd --- files/templates/admin/alt_votes.html | 2 +- files/templates/admin/banned_domains.html | 2 +- files/templates/admin/content_stats.html | 2 +- files/templates/admins.html | 2 +- files/templates/agendaposters.html | 2 +- files/templates/authforms.html | 4 ++-- files/templates/badges.html | 2 +- files/templates/banned.html | 2 +- files/templates/blocks.html | 2 +- files/templates/default.html | 4 ++-- files/templates/followers.html | 2 +- files/templates/following.html | 2 +- files/templates/formatting.html | 8 ++++---- files/templates/grassed.html | 2 +- files/templates/leaderboard.html | 22 +++++++++++----------- files/templates/log.html | 4 ++-- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/marseys.html | 2 +- files/templates/patrons.html | 2 +- files/templates/rentoids.html | 2 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 4 ++-- files/templates/shadowbanned.html | 2 +- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 4 ++-- files/templates/thiefs.html | 6 +++--- files/templates/viewers.html | 2 +- files/templates/voters.html | 2 +- files/templates/votes.html | 4 ++-- 31 files changed, 52 insertions(+), 52 deletions(-) diff --git a/files/templates/admin/alt_votes.html b/files/templates/admin/alt_votes.html index 79a1ed723..0c6cbc472 100644 --- a/files/templates/admin/alt_votes.html +++ b/files/templates/admin/alt_votes.html @@ -27,7 +27,7 @@ -
    #
    +
    diff --git a/files/templates/admin/banned_domains.html b/files/templates/admin/banned_domains.html index ce584bf51..bac049522 100644 --- a/files/templates/admin/banned_domains.html +++ b/files/templates/admin/banned_domains.html @@ -10,7 +10,7 @@ -
    +
    diff --git a/files/templates/admin/content_stats.html b/files/templates/admin/content_stats.html index 9e964fe4b..2299101a3 100644 --- a/files/templates/admin/content_stats.html +++ b/files/templates/admin/content_stats.html @@ -7,7 +7,7 @@ {% block content %}
    
    -
    Domain
    +
    diff --git a/files/templates/admins.html b/files/templates/admins.html index 80bd42cb4..36c63c918 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -10,7 +10,7 @@
    Admins
    -
    Statistic
    +
    diff --git a/files/templates/agendaposters.html b/files/templates/agendaposters.html index aeea1e379..61287b766 100644 --- a/files/templates/agendaposters.html +++ b/files/templates/agendaposters.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} -
    #
    +
    diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 13ee53cba..626f6411d 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/badges.html b/files/templates/badges.html index 2a13b1147..2ef67c8b9 100644 --- a/files/templates/badges.html +++ b/files/templates/badges.html @@ -10,7 +10,7 @@ -
    #
    +
    diff --git a/files/templates/banned.html b/files/templates/banned.html index a54b02087..0a6cfbf1c 100644 --- a/files/templates/banned.html +++ b/files/templates/banned.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} -
    Name
    +
    diff --git a/files/templates/blocks.html b/files/templates/blocks.html index 9e19c2633..5d1a1a225 100644 --- a/files/templates/blocks.html +++ b/files/templates/blocks.html @@ -5,7 +5,7 @@ {% block content %}

    Blocks

    
    -
    #
    +
    diff --git a/files/templates/default.html b/files/templates/default.html index 1c09e3476..c682f070c 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/followers.html b/files/templates/followers.html index 47a8ab106..748aae664 100644 --- a/files/templates/followers.html +++ b/files/templates/followers.html @@ -7,7 +7,7 @@
    @{{u.username}}'s followers
    
    -
    User
    +
    diff --git a/files/templates/following.html b/files/templates/following.html index b42986043..8da536d6c 100644 --- a/files/templates/following.html +++ b/files/templates/following.html @@ -7,7 +7,7 @@
    Users followed by @{{u.username}}
    
    -
    #
    +
    diff --git a/files/templates/formatting.html b/files/templates/formatting.html index 48e844242..f36c0a571 100644 --- a/files/templates/formatting.html +++ b/files/templates/formatting.html @@ -17,7 +17,7 @@ You can use Markdown formatting: -
    #
    +
    @@ -159,7 +159,7 @@ And we allow custom HTML in most places:

    Allowed Tags

    -
    Name
    +
    @@ -453,7 +453,7 @@ line breaks

    Allowed Attributes

    -
    Name
    +
    @@ -489,7 +489,7 @@ line breaks
    Allowed Styles
    -
    Name
    +
    diff --git a/files/templates/grassed.html b/files/templates/grassed.html index 179428eed..35d8f6fdf 100644 --- a/files/templates/grassed.html +++ b/files/templates/grassed.html @@ -2,7 +2,7 @@ {% block content %}
    -
    Name
    +
    diff --git a/files/templates/leaderboard.html b/files/templates/leaderboard.html index 3981d617e..23955e239 100644 --- a/files/templates/leaderboard.html +++ b/files/templates/leaderboard.html @@ -6,7 +6,7 @@
    Top 25 by {{'COINS_NAME' | app_config}}
    
    -
    #
    +
    @@ -33,7 +33,7 @@ -
    #
    +
    @@ -61,7 +61,7 @@ -
    #
    +
    @@ -89,7 +89,7 @@ -
    #
    +
    @@ -114,7 +114,7 @@ -
    #
    +
    @@ -139,7 +139,7 @@ -
    #
    +
    @@ -166,7 +166,7 @@ -
    #
    +
    @@ -194,7 +194,7 @@ -
    #
    +
    @@ -224,7 +224,7 @@ -
    #
    +
    @@ -255,7 +255,7 @@ -
    #
    +
    @@ -284,7 +284,7 @@ -
    #
    +
    diff --git a/files/templates/log.html b/files/templates/log.html index 5441aee61..25122d556 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}
    diff --git a/files/templates/login.html b/files/templates/login.html index fc8d4b1d0..ecf2553ee 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 37aa5caa0..256550ef4 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/marseys.html b/files/templates/marseys.html index e374b01ce..9d687609c 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -4,7 +4,7 @@ -
    #
    +
    diff --git a/files/templates/patrons.html b/files/templates/patrons.html index 719bf6d00..76668e93f 100644 --- a/files/templates/patrons.html +++ b/files/templates/patrons.html @@ -1,7 +1,7 @@ {% extends "settings2.html" %} {% block content %} -
    #
    +
    diff --git a/files/templates/rentoids.html b/files/templates/rentoids.html index acc075cd5..3d9d84e33 100644 --- a/files/templates/rentoids.html +++ b/files/templates/rentoids.html @@ -3,7 +3,7 @@
    Rentoids
    
    -
    #
    +
    diff --git a/files/templates/settings.html b/files/templates/settings.html index 722a1cc10..cc7926838 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/shadowbanned.html b/files/templates/shadowbanned.html index 4e2aea419..85926bac8 100644 --- a/files/templates/shadowbanned.html +++ b/files/templates/shadowbanned.html @@ -3,7 +3,7 @@ {% block content %}
    -
    #
    +
    diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 3f6613cf9..9833dbe65 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index 5dbe6ed50..f96808fe4 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index 8ae479880..35d49c938 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} diff --git a/files/templates/thiefs.html b/files/templates/thiefs.html index 768ff99d4..6d530eed9 100644 --- a/files/templates/thiefs.html +++ b/files/templates/thiefs.html @@ -3,7 +3,7 @@
    Successful thiefs
    
    -
    #
    +
    @@ -21,7 +21,7 @@
    Evicted thiefs
    
    -
    #
    +
    @@ -39,7 +39,7 @@
    Jailed thiefs
    
    -
    #
    +
    diff --git a/files/templates/viewers.html b/files/templates/viewers.html index 5fb11ff2b..a1da9c9de 100644 --- a/files/templates/viewers.html +++ b/files/templates/viewers.html @@ -3,7 +3,7 @@
    Users who viewed your profile
    
    -
    #
    +
    diff --git a/files/templates/voters.html b/files/templates/voters.html index 4ae5e9c49..67376e863 100644 --- a/files/templates/voters.html +++ b/files/templates/voters.html @@ -6,7 +6,7 @@
    {{name2}}
    
    -
    Name
    +
    diff --git a/files/templates/votes.html b/files/templates/votes.html index d8c0988cc..8e433767e 100644 --- a/files/templates/votes.html +++ b/files/templates/votes.html @@ -19,7 +19,7 @@

    Downvotes: {{downs | length}}

    Upvotes

    -
    #
    +
    {% for vote in ups %} @@ -28,7 +28,7 @@
    User

    Downvotes

    -
    +
    {% for vote in downs %} From 932a69c1c9a8abbff0b38d17acba14e99d6b9b36 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 13:00:11 +0200 Subject: [PATCH 12/30] fds --- files/routes/login.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/login.py b/files/routes/login.py index 223801b76..b6344b353 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -171,7 +171,7 @@ def logout(v): @auth_desired def sign_up_get(v): with open('disablesignups', 'r') as f: - if f.read() == "yes": return {"error","New account registration is currently closed. Please come back later."}, 403 + if f.read() == "yes": return {"error": "New account registration is currently closed. Please come back later."}, 403 if v: return redirect("/") @@ -216,7 +216,7 @@ def sign_up_get(v): @auth_desired def sign_up_post(v): with open('disablesignups', 'r') as f: - if f.read() == "yes": return {"error","New account registration is currently closed. Please come back later."}, 403 + if f.read() == "yes": return {"error": "New account registration is currently closed. Please come back later."}, 403 if v: abort(403) From 229f660eab71fa21001cacc0846232f3463cdb7f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 13:02:04 +0200 Subject: [PATCH 13/30] fds --- files/routes/static.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/static.py b/files/routes/static.py index 1cb6a7870..f2250aa8e 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -377,7 +377,7 @@ def blocks(v): @auth_desired def banned(v): - users = [x for x in g.db.query(User).filter(User.is_banned > 0, User.unban_utc == 0).all()] + users = [x for x in g.db.query(User).filter(User.is_banned > 0, User.unban_utc == 0).order_by(User.is_banned).all()] if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' return render_template(f"{template}banned.html", v=v, users=users) From 5a0eb9e41c9433df7878086675c53f1f0427a323 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 13:02:56 +0200 Subject: [PATCH 14/30] fds --- files/templates/admin/admin_home.html | 1 + 1 file changed, 1 insertion(+) diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 31f6cff11..0d2300078 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -23,6 +23,7 @@ From c7d26608c4c9f2e8f15808559e75b96883e59216 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 13:05:25 +0200 Subject: [PATCH 15/30] vxc --- files/routes/static.py | 2 +- files/routes/users.py | 2 +- files/templates/admins.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index f2250aa8e..1cb6a7870 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -377,7 +377,7 @@ def blocks(v): @auth_desired def banned(v): - users = [x for x in g.db.query(User).filter(User.is_banned > 0, User.unban_utc == 0).order_by(User.is_banned).all()] + users = [x for x in g.db.query(User).filter(User.is_banned > 0, User.unban_utc == 0).all()] if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' return render_template(f"{template}banned.html", v=v, users=users) diff --git a/files/routes/users.py b/files/routes/users.py index b37d59cae..9c42e6a9f 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -31,7 +31,7 @@ def grassed(v): @app.get("/agendaposters") @auth_desired def agendaposters(v): - users = [x for x in g.db.query(User).filter_by(agendaposter = True).all()] + users = [x for x in g.db.query(User).filter_by(agendaposter = True).order_by(User.username).all()] if not v or v.oldsite: template = '' else: template = 'CHRISTMAS/' return render_template(f"{template}agendaposters.html", v=v, users=users) diff --git a/files/templates/admins.html b/files/templates/admins.html index 36c63c918..193c9e71a 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -4,7 +4,7 @@ {% block content %} - +
    
     
    Admins
    From 51bc463b6e39f2266e52b6daf7ca447daca5ca80 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 13:09:35 +0200 Subject: [PATCH 16/30] fds --- files/templates/admins.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/templates/admins.html b/files/templates/admins.html index 193c9e71a..ee2d76d6b 100644 --- a/files/templates/admins.html +++ b/files/templates/admins.html @@ -4,7 +4,7 @@ {% block content %} - +
    
     
    Admins
    @@ -15,8 +15,8 @@
    - - + + {% for user in admins %} From b5ada859ffa918e00843d0df4336f2fbe825ee8b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 13:26:30 +0200 Subject: [PATCH 17/30] fsd --- files/routes/static.py | 2 +- files/templates/emoji_modal.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index 1cb6a7870..a8468b468 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -42,7 +42,7 @@ def participation_stats(v): day = now - 86400 data = {"marseys": len(marseys), - "valid_users": g.db.query(User.id).count(), + "users": g.db.query(User.id).count(), "private_users": g.db.query(User.id).filter_by(is_private=True).count(), "banned_users": g.db.query(User.id).filter(User.is_banned > 0).count(), "verified_email_users": g.db.query(User.id).filter_by(is_activated=True).count(), diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index eb076e80e..04ecada16 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -80,7 +80,7 @@ - + - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index c682f070c..6fbfed6c3 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index 25122d556..ef26fb9d1 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}
    diff --git a/files/templates/login.html b/files/templates/login.html index ecf2553ee..975ea6961 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 256550ef4..57fd68835 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index cc7926838..984b8cea5 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 9833dbe65..ac8e9f25f 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index f96808fe4..dce0ced92 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index 35d49c938..6d6f0b2eb 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} From b0bef4710016f89082d4f06c727edb95210801f8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 13:43:25 +0200 Subject: [PATCH 20/30] fsd --- files/templates/authforms.html | 4 ++-- files/templates/default.html | 4 ++-- files/templates/log.html | 4 ++-- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 4 ++-- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/files/templates/authforms.html b/files/templates/authforms.html index e6745375c..b435e6e2a 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -15,7 +15,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 6fbfed6c3..e1926dc2f 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -7,7 +7,7 @@ {% if v %} - + {% if v.agendaposter %} - + {% endif %} diff --git a/files/templates/log.html b/files/templates/log.html index ef26fb9d1..102e08e42 100644 --- a/files/templates/log.html +++ b/files/templates/log.html @@ -6,7 +6,7 @@ {% block content %} {% if v %} - + {% if v.agendaposter %} - + {% endif %}
    diff --git a/files/templates/login.html b/files/templates/login.html index 975ea6961..3535f80dd 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -18,7 +18,7 @@ {% endblock %} - + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 57fd68835..24e86fb23 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -14,7 +14,7 @@ 2-Step Login - {{'SITE_NAME' | app_config}} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 984b8cea5..773760ac6 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -34,7 +34,7 @@ - + {% if v.agendaposter %} - + {% else %} - + {% endif %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index ac8e9f25f..ef8939473 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -31,7 +31,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index dce0ced92..060dd455e 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -32,7 +32,7 @@ {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} - + diff --git a/files/templates/submit.html b/files/templates/submit.html index 6d6f0b2eb..cc9a8b974 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -26,7 +26,7 @@ {% block stylesheets %} {% if v %} - + {% if v.agendaposter %} - + {% endif %} {% endblock %} From ad4780bc1ce7115ac18711a3d0492ba25d9307db Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 14:20:15 +0200 Subject: [PATCH 22/30] vdfs --- files/templates/comments.html | 2 +- files/templates/expanded_image_modal.html | 4 +++- files/templates/submission_listing.html | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index 1f6226b32..f74b67cdf 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -857,7 +857,7 @@ {% include "expanded_image_modal.html" %} - + diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 2e536e49b..83bace10a 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -698,5 +698,5 @@ - + \ No newline at end of file From 8256b501449d6abc125bc9031cd9b6d976b12187 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 14:20:56 +0200 Subject: [PATCH 23/30] fsd --- files/templates/expanded_image_modal.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/files/templates/expanded_image_modal.html b/files/templates/expanded_image_modal.html index 4113ba80d..e0681b29a 100644 --- a/files/templates/expanded_image_modal.html +++ b/files/templates/expanded_image_modal.html @@ -25,6 +25,4 @@ .m-5 { margin: 2.5rem !important; } - - + \ No newline at end of file From 08e98fe1f2dd9f1ba552febbb065981c0eaec271 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 14:22:52 +0200 Subject: [PATCH 24/30] fds --- files/templates/comments.html | 2 +- files/templates/submission_listing.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index f74b67cdf..fae5ca564 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -857,7 +857,7 @@ {% include "expanded_image_modal.html" %} - + - + \ No newline at end of file From 308976e379b599f1b88d6021a63f4883361dd460 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 14:30:25 +0200 Subject: [PATCH 26/30] fd --- files/templates/comments.html | 2 +- files/templates/submission_listing.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index fae5ca564..e33bd5ff2 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -857,7 +857,7 @@ {% include "expanded_image_modal.html" %} - + - + \ No newline at end of file From 54df78aa5b2591f2e2abee16c893f088a1a99562 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 15:31:15 +0200 Subject: [PATCH 27/30] fs --- files/templates/home.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/templates/home.html b/files/templates/home.html index 91c82f5be..fd4d91034 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -99,7 +99,7 @@
    -
    CREATE A POST
    +
    {% if request.host == 'rdrama.net' %}SUBMIT DRAMA!{% else %}CREATE A POST{% endif %}
    • From 283854dbc24a3064c37c9b2d747d28b6295f168d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 3 Jan 2022 15:43:23 +0200 Subject: [PATCH 28/30] fds --- files/templates/blocks.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/templates/blocks.html b/files/templates/blocks.html index 5d1a1a225..0b9d6a6c4 100644 --- a/files/templates/blocks.html +++ b/files/templates/blocks.html @@ -8,12 +8,14 @@
    User
    # NameTruescoreMod actionsTruescoreMod actions
    + {% for user in users %} + From 4bd38b513316285e387d791e2da00546df6c1b8c Mon Sep 17 00:00:00 2001 From: Aevann1 <59999695+Aevann1@users.noreply.github.com> Date: Mon, 3 Jan 2022 06:49:48 -0800 Subject: [PATCH 29/30] Update FUNDING.yml --- .github/FUNDING.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 0612d9440..086a50048 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,3 @@ github: Aevann1 -custom: ["https://marsey1.gumroad.com/l/tfcvri"] \ No newline at end of file +custom: ["https://marsey1.gumroad.com/l/tfcvri"] +custom: ["bitcoin bc1qs5hamvytnkllgml89flzhcyt3l4a3u4gs8lvvp"] From a036c5e40f696e155e736fd52d85399fca441031 Mon Sep 17 00:00:00 2001 From: Aevann1 <59999695+Aevann1@users.noreply.github.com> Date: Mon, 3 Jan 2022 06:50:01 -0800 Subject: [PATCH 30/30] Update FUNDING.yml --- .github/FUNDING.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 086a50048..1d7bc6b62 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,2 @@ github: Aevann1 custom: ["https://marsey1.gumroad.com/l/tfcvri"] -custom: ["bitcoin bc1qs5hamvytnkllgml89flzhcyt3l4a3u4gs8lvvp"]
    # User Target
    {{loop.index}} {{user.username}} {{targets[loop.index-1].username}}