forked from rDrama/rDrama
1
0
Fork 0

show event music toggle to everyone and give error

master
Aevann 2023-12-01 16:48:12 +02:00
parent 246fafa036
commit a967eece26
2 changed files with 4 additions and 2 deletions

View File

@ -193,7 +193,9 @@ def settings_personal_post(v):
updated = 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 request.values.get("event_music", v.event_music) != v.event_music:
if not v.can_toggle_event_music:
abort(403, "You need to award yourself the grinch award to be able to disable event music!")
updated = True
session['event_music'] = request.values.get("event_music", v.event_music) == 'true'

View File

@ -7,7 +7,7 @@
<section id="site-settings-experience-section" class="settings-section-section">
<h5>Site Experience</h5>
<div class="settings-section rounded" id="site-settings-experience">
{% if IS_EVENT() and v.can_toggle_event_music %}
{% if IS_EVENT() %}
{{common.toggle_section('Event Music', 'event_music_switch', 'event_music', v.event_music, 'Toggle event music.', false)}}
{% endif %}
<div class="d-lg-flex border-bottom">