From 95d8015fc0d32643165323e6e797aaa6731a966b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 10 Sep 2021 06:32:01 +0200 Subject: [PATCH] fd --- files/routes/settings.py | 12 +++++++++++- files/templates/default.html | 2 +- files/templates/formatting.html | 2 +- files/templates/login.html | 2 +- files/templates/settings.html | 2 +- files/templates/settings2.html | 2 +- files/templates/sign_up.html | 2 +- files/templates/sign_up_failed_ref.html | 2 +- files/templates/submit.html | 2 +- files/templates/userpage.html | 5 +++-- 10 files changed, 22 insertions(+), 11 deletions(-) diff --git a/files/routes/settings.py b/files/routes/settings.py index 0c8a8117e..c05887570 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -842,4 +842,14 @@ def settings_title_change(v): v.customtitle = filter_title(new_name) g.db.add(v) - return redirect("/settings/profile") \ No newline at end of file + return redirect("/settings/profile") + + +@app.post("/settings/badges") +@auth_required +@validate_formkey +def settings_badge_recheck(v): + + v.refresh_selfset_badges() + + return {"message":"Badges Refreshed"} \ No newline at end of file diff --git a/files/templates/default.html b/files/templates/default.html index 5badc09b2..6c58fe189 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -1251,7 +1251,7 @@ {% include "expanded_image_modal.html" %} - + diff --git a/files/templates/formatting.html b/files/templates/formatting.html index 9164bcff2..705e26b0a 100644 --- a/files/templates/formatting.html +++ b/files/templates/formatting.html @@ -144,6 +144,6 @@ We also have some custom hooks for mentioning users and subreddits. Note that th {% include "expanded_image_modal.html" %} - + {% endblock %} diff --git a/files/templates/login.html b/files/templates/login.html index 885137e41..25837626f 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -130,7 +130,7 @@ {% include "bootstrap.html" %} - + diff --git a/files/templates/settings.html b/files/templates/settings.html index 6fccf5a5d..b5b43bebc 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -254,7 +254,7 @@ - + {% block onload %}{% endblock %} diff --git a/files/templates/settings2.html b/files/templates/settings2.html index 42ec62685..bc7e4c001 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -226,7 +226,7 @@ }); - + {% block scripts %} {% endblock %} diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index c28b08551..17140d28b 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -233,7 +233,7 @@ - + diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index 5d1b3bc51..58f31e357 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -144,7 +144,7 @@ - + diff --git a/files/templates/submit.html b/files/templates/submit.html index 4f0cf7a5e..900b8beb1 100644 --- a/files/templates/submit.html +++ b/files/templates/submit.html @@ -482,7 +482,7 @@ - + diff --git a/files/templates/userpage.html b/files/templates/userpage.html index e1096841d..1b3a19754 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -244,6 +244,7 @@ {% elif v and v.id == u.id %} Edit profile Profile views + Refresh Badges {% endif %} {% if v and v.id != u.id and v.admin_level > 1 %}

@@ -445,8 +446,8 @@ {% if v and v.id == u.id %} Edit profile - Profile views - {% endif %} + Refresh Badges + {% endif %} {% if v and v.id != u.id %} Unfollow Follow