remotes/1693045480750635534/spooky-22
Aevann1 2021-09-10 06:32:01 +02:00
parent 1fbcbaa2af
commit 95d8015fc0
10 changed files with 22 additions and 11 deletions

View File

@ -842,4 +842,14 @@ def settings_title_change(v):
v.customtitle = filter_title(new_name)
g.db.add(v)
return redirect("/settings/profile")
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"}

View File

@ -1251,7 +1251,7 @@
{% include "expanded_image_modal.html" %}
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
<!-- ClipboardJS -->

View File

@ -144,6 +144,6 @@ We also have some custom hooks for mentioning users and subreddits. Note that th
{% include "expanded_image_modal.html" %}
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
{% endblock %}

View File

@ -130,7 +130,7 @@
{% include "bootstrap.html" %}
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
</body>

View File

@ -254,7 +254,7 @@
</div>
</div>
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
{% block onload %}{% endblock %}

View File

@ -226,7 +226,7 @@
});
</script>
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
{% block scripts %}
{% endblock %}

View File

@ -233,7 +233,7 @@
<!-- {{'SITE_NAME' | app_config}} JS -->
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
</body>

View File

@ -144,7 +144,7 @@
<!-- {{'SITE_NAME' | app_config}} JS -->
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
</body>

View File

@ -482,7 +482,7 @@
<!-- {{'SITE_NAME' | app_config}} JS -->
<script src="/assets/js/general15.js"></script>
<script src="/assets/js/general16.js"></script>
<!-- ClipboardJS -->

View File

@ -244,6 +244,7 @@
{% elif v and v.id == u.id %}
<a href="/settings/profile" class="btn btn-secondary">Edit profile</a>
<a href="/views" class="btn btn-secondary">Profile views</a>
<a href="javascript:void(0)" onclick="post_toast('/settings/badges','1')" class="btn btn-secondary">Refresh Badges</a>
{% endif %}
{% if v and v.id != u.id and v.admin_level > 1 %}
<br><br>
@ -445,8 +446,8 @@
</div>
{% if v and v.id == u.id %}
<a href="/settings/profile" class="btn btn-secondary btn-sm">Edit profile</a>
<a href="/views" class="btn btn-secondary btn-sm">Profile views</a>
{% endif %}
<a href="javascript:void(0)" onclick="post_toast('/settings/badges','1')" class="btn btn-secondary">Refresh Badges</a>
{% endif %}
{% if v and v.id != u.id %}
<a id="button-unsub2" class="btn btn-secondary {% if not is_following %}d-none{% endif %}" href="javascript:void(0)" onclick="post_toast('/unfollow/{{u.username}}', callback=function(){document.getElementById('button-unsub2').classList.toggle('d-none');document.getElementById('button-sub2').classList.toggle('d-none');})">Unfollow</a>
<a id="button-sub2" class="btn btn-primary {% if is_following or u.is_nofollow or u.is_blocked %}d-none{% endif %}" href="javascript:void(0)" onclick="post_toast('/follow/{{u.username}}', callback=function(){document.getElementById('button-sub2').classList.toggle('d-none');document.getElementById('button-unsub2').classList.toggle('d-none');})">Follow</a>