"Disable NSFW Warnings" -> "NSFW Warnings"
parent
bb7192c929
commit
a1de1cf7c8
|
@ -284,8 +284,8 @@ class User(Base):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def nsfw(self):
|
def nsfw_warnings(self):
|
||||||
return bool(session.get('nsfw'))
|
return bool(session.get('nsfw_warnings', True))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -178,9 +178,9 @@ def settings_personal_post(v):
|
||||||
updated = True
|
updated = True
|
||||||
session["cursormarsey"] = int(request.values.get("cursormarsey") == 'true')
|
session["cursormarsey"] = int(request.values.get("cursormarsey") == 'true')
|
||||||
|
|
||||||
elif not updated and request.values.get("nsfw", v.nsfw) != v.nsfw:
|
elif not updated and request.values.get("nsfw_warnings", v.nsfw_warnings) != v.nsfw_warnings:
|
||||||
updated = True
|
updated = True
|
||||||
session["nsfw"] = int(request.values.get("nsfw") == 'true')
|
session["nsfw_warnings"] = int(request.values.get("nsfw_warnings") == 'true')
|
||||||
|
|
||||||
elif not updated and IS_EVENT() and v.can_toggle_event_music and request.values.get("event_music", v.event_music) != v.event_music:
|
elif not updated and IS_EVENT() and v.can_toggle_event_music and request.values.get("event_music", v.event_music) != v.event_music:
|
||||||
updated = True
|
updated = True
|
||||||
|
|
|
@ -121,7 +121,7 @@ def get_logged_in_user():
|
||||||
if v and not IS_EVENT():
|
if v and not IS_EVENT():
|
||||||
session.pop("event_music", None)
|
session.pop("event_music", None)
|
||||||
|
|
||||||
g.show_nsfw = SITE_NAME == 'WPD' or (v and v.nsfw) or session.get('nsfw_cookies', 0) >= int(time.time())
|
g.show_nsfw = SITE_NAME == 'WPD' or (v and not v.nsfw_warnings) or session.get('nsfw_cookies', 0) >= int(time.time())
|
||||||
|
|
||||||
return v
|
return v
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
<div class="settings-section rounded">
|
<div class="settings-section rounded">
|
||||||
{{common.toggle_section('Disable Signatures', 'sigs_disabled', 'sigs_disabled', v.sigs_disabled, 'Hide user signatures.', false)}}
|
{{common.toggle_section('Disable Signatures', 'sigs_disabled', 'sigs_disabled', v.sigs_disabled, 'Hide user signatures.', false)}}
|
||||||
{% if FEATURES['NSFW_MARKING'] %}
|
{% if FEATURES['NSFW_MARKING'] %}
|
||||||
{{common.toggle_section('Disable NSFW Warnings', 'nsfw', 'nsfw', v.nsfw, "Disable the warning that appears when viewing NSFW posts and stop collapsing NSFW comments.", false)}}
|
{{common.toggle_section('NSFW Warnings', 'nsfw_warnings', 'nsfw_warnings', v.nsfw_warnings, "Show a warning when viewing NSFW posts and collapse NSFW comments.", false)}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if SITE_NAME != 'rDrama' %}
|
{% if SITE_NAME != 'rDrama' %}
|
||||||
{{common.toggle_section('Hide Posts Voted On', 'hidevotedon', 'hidevotedon', v.hidevotedon, 'Enable if you would like to automatically hide posts you have voted on from your frontpage.', false)}}
|
{{common.toggle_section('Hide Posts Voted On', 'hidevotedon', 'hidevotedon', v.hidevotedon, 'Enable if you would like to automatically hide posts you have voted on from your frontpage.', false)}}
|
||||||
|
|
Loading…
Reference in New Issue