forked from MarseyWorld/MarseyWorld
make poorcel-mode device-specific
parent
234cbe47ee
commit
52a8a219ae
|
@ -328,7 +328,7 @@ class Comment(Base):
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def award_count(self, kind, v):
|
def award_count(self, kind, v):
|
||||||
if v and v.poorcel: return 0
|
if v and v.poor: return 0
|
||||||
return len([x for x in self.awards if x.kind == kind])
|
return len([x for x in self.awards if x.kind == kind])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -436,7 +436,7 @@ class Comment(Base):
|
||||||
if not self.total_choice_voted(v): body += ' d-none'
|
if not self.total_choice_voted(v): body += ' d-none'
|
||||||
body += f'"> - <a href="/votes?link=t3_{c.id}"><span id="choice-{c.id}">{c.upvotes}</span> votes</a></span></label></div>'
|
body += f'"> - <a href="/votes?link=t3_{c.id}"><span id="choice-{c.id}">{c.upvotes}</span> votes</a></span></label></div>'
|
||||||
|
|
||||||
if self.author.sig_html and (self.author_id == MOOSE_ID or (not self.ghost and not (v and (v.sigs_disabled or v.poorcel)))):
|
if self.author.sig_html and (self.author_id == MOOSE_ID or (not self.ghost and not (v and (v.sigs_disabled or v.poor)))):
|
||||||
body += f"<hr>{self.author.sig_html}"
|
body += f"<hr>{self.author.sig_html}"
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
|
|
@ -367,7 +367,7 @@ class Submission(Base):
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def award_count(self, kind, v):
|
def award_count(self, kind, v):
|
||||||
if v and v.poorcel: return 0
|
if v and v.poor: return 0
|
||||||
return len([x for x in self.awards if x.kind == kind])
|
return len([x for x in self.awards if x.kind == kind])
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
|
@ -444,7 +444,7 @@ class Submission(Base):
|
||||||
body += "</div>"
|
body += "</div>"
|
||||||
|
|
||||||
|
|
||||||
if self.author.sig_html and (self.author_id == MOOSE_ID or (not self.ghost and not (v and (v.sigs_disabled or v.poorcel)))):
|
if self.author.sig_html and (self.author_id == MOOSE_ID or (not self.ghost and not (v and (v.sigs_disabled or v.poor)))):
|
||||||
body += f"<hr>{self.author.sig_html}"
|
body += f"<hr>{self.author.sig_html}"
|
||||||
|
|
||||||
return body
|
return body
|
||||||
|
|
|
@ -72,6 +72,8 @@ def get_logged_in_user():
|
||||||
|
|
||||||
g.v = v
|
g.v = v
|
||||||
|
|
||||||
|
if v: v.poor = session.get('poor')
|
||||||
|
|
||||||
return v
|
return v
|
||||||
|
|
||||||
def check_ban_evade(v):
|
def check_ban_evade(v):
|
||||||
|
|
|
@ -61,9 +61,10 @@ def settings_profile_post(v):
|
||||||
updated = True
|
updated = True
|
||||||
v.slurreplacer = request.values.get("slurreplacer") == 'true'
|
v.slurreplacer = request.values.get("slurreplacer") == 'true'
|
||||||
|
|
||||||
elif request.values.get("poorcel", v.poorcel) != v.poorcel:
|
elif request.values.get("poorcel", v.poor) != v.poor:
|
||||||
updated = True
|
updated = True
|
||||||
v.poorcel = request.values.get("poorcel") == 'true'
|
v.poorcel = request.values.get("poorcel") == 'true'
|
||||||
|
session['poor'] = v.poorcel
|
||||||
|
|
||||||
elif request.values.get("hidevotedon", v.hidevotedon) != v.hidevotedon:
|
elif request.values.get("hidevotedon", v.hidevotedon) != v.hidevotedon:
|
||||||
updated = True
|
updated = True
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="px-3">
|
<div class="px-3">
|
||||||
<input disabled autocomplete="off" class="form-control px-2" type="text" id="emoji_search" placeholder="Search.." onchange="start_search()" {% if not (v and v.poorcel) %}oninput="start_search()"{% endif %}>
|
<input disabled autocomplete="off" class="form-control px-2" type="text" id="emoji_search" placeholder="Search.." onchange="start_search()" {% if not (v and v.poor) %}oninput="start_search()"{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-3 d-flex flex-row">
|
<div class="px-3 d-flex flex-row">
|
||||||
<fieldset class="p-2">
|
<fieldset class="p-2">
|
||||||
|
|
|
@ -303,7 +303,7 @@
|
||||||
</style>
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.poorcel -%}
|
{% if v and v.poor -%}
|
||||||
<style>
|
<style>
|
||||||
* :not(img[src="/i/hand.webp"] + img):not(img.golden, img[g], img[glow]) {
|
* :not(img[src="/i/hand.webp"] + img):not(img.golden, img[g], img[glow]) {
|
||||||
animation: unset !important;
|
animation: unset !important;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<div class="body w-lg-100">
|
<div class="body w-lg-100">
|
||||||
|
|
||||||
<div class="custom-control custom-switch">
|
<div class="custom-control custom-switch">
|
||||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="poorcel" name="poorcel"{% if v.poorcel %} checked{% endif %} onchange="post_toast(this,'/settings/profile?poorcel='+document.getElementById('poorcel').checked);">
|
<input autocomplete="off" type="checkbox" class="custom-control-input" id="poorcel" name="poorcel"{% if v.poor %} checked{% endif %} onchange="post_toast(this,'/settings/profile?poorcel='+document.getElementById('poorcel').checked);">
|
||||||
<label class="custom-control-label" for="poorcel"></label>
|
<label class="custom-control-label" for="poorcel"></label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue