forked from rDrama/rDrama
add spider toggle
parent
a3a7ec6296
commit
dd7145410f
|
@ -108,6 +108,14 @@ def settings_profile_post(v):
|
||||||
badge = v.has_badge(170)
|
badge = v.has_badge(170)
|
||||||
if badge: g.db.delete(badge)
|
if badge: g.db.delete(badge)
|
||||||
|
|
||||||
|
elif request.values.get("spider", v.spider) != v.spider and v.spider <= 1:
|
||||||
|
updated = True
|
||||||
|
v.spider = int(request.values.get("spider") == 'true')
|
||||||
|
if v.spider: badge_grant(user=v, badge_id=179)
|
||||||
|
else:
|
||||||
|
badge = v.has_badge(170)
|
||||||
|
if badge: g.db.delete(badge)
|
||||||
|
|
||||||
elif request.values.get("bio") == "":
|
elif request.values.get("bio") == "":
|
||||||
v.bio = None
|
v.bio = None
|
||||||
v.bio_html = None
|
v.bio_html = None
|
||||||
|
|
|
@ -761,6 +761,21 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="d-lg-flex border-bottom">
|
||||||
|
<div class="title w-lg-25">
|
||||||
|
<label for="spiderswitch">Spider</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
|
<div class="custom-control custom-switch">
|
||||||
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="spiderswitch" name="spider" {% if v.spider%}checked{% endif %} {% if v.spider > 1 %}disabled{% endif %} onchange="post_toast(this,'/settings/profile?spider='+document.getElementById('spiderswitch').checked)">
|
||||||
|
<label class="custom-control-label" for="spiderswitch"></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="text-small text-muted">Have a spider friend accompany you during your journey in the site.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue