forked from rDrama/rDrama
make sure all settings are visible + move the checkmark settings to their own section
parent
407eabf8f5
commit
b6a02b0874
|
@ -423,7 +423,7 @@ def titlecolor(v):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def verifiedcolor(v):
|
||||
if not v.verified: abort(403, "You don't have a checkmark")
|
||||
if not v.verified: abort(403, "You don't have a checkmark to edit its color!")
|
||||
return set_color(v, "verifiedcolor", request.values.get("verifiedcolor"))
|
||||
|
||||
@app.post("/settings/security")
|
||||
|
@ -963,7 +963,8 @@ def settings_pronouns_change(v):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@auth_required
|
||||
def settings_checkmark_text(v):
|
||||
if not v.verified: abort(403)
|
||||
if not v.verified:
|
||||
abort(403, "You don't have a checkmark to edit its hover text!")
|
||||
|
||||
processed = process_settings_plaintext("checkmark-text", v.verified, 100)
|
||||
if isinstance(processed, tuple):
|
||||
|
|
|
@ -52,8 +52,7 @@
|
|||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro line_text_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, button_text, show_marseys, minlength, maxlength, pattern, show_if, disabled) %}
|
||||
{% if show_if -%}
|
||||
{% macro line_text_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, button_text, show_marseys, minlength, maxlength, pattern, disabled) %}
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
<label class="text-black w-lg-25">{{section_title}}</label>
|
||||
<div class="w-lg-100">
|
||||
|
@ -70,11 +69,9 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro text_area_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, show_extras, show_file_upload, maxlength, show_if) %}
|
||||
{% if show_if -%}
|
||||
{% macro text_area_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, show_extras, show_file_upload, maxlength) %}
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
<label class="text-black w-lg-25">{{section_title}}</label>
|
||||
<div class="w-lg-100">
|
||||
|
@ -99,5 +96,4 @@
|
|||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{% endmacro %}
|
||||
|
|
|
@ -197,14 +197,15 @@
|
|||
</div>
|
||||
</div>
|
||||
{{common.color_section('namecolor', '/settings/namecolor', 'namecolor', 'Name Color', v.name_color)}}
|
||||
{{common.line_text_section('pronouns', '/settings/pronouns_change', 'pronouns', 'Pronouns', v.pronouns, 'Limit of 15 characters', 'Enter pronouns here', 'Change Pronouns', false, 3, 15, '([a-zA-Z]{1,7})/[a-zA-Z]{1,7}(/[a-zA-Z]{1,7})?', FEATURES['PRONOUNS'], false)}}
|
||||
{# common.line_text_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, button_text, show_marseys, minlength, maxlength, pattern, show_if, disabled) #}
|
||||
{{common.line_text_section('flair', '/settings/title_change', 'title', 'Flair', v.customtitleplain, 'Limit of 100 characters', 'Enter a flair here', 'Change Flair', true, 0, 100, '.*', true, v.flairchanged)}}
|
||||
{{common.color_section('flaircolor', '/settings/titlecolor', 'titlecolor', 'Flair Color', v.titlecolor)}}
|
||||
{% if v.verified %}
|
||||
{{common.color_section('verifiedcolor', '/settings/verifiedcolor', 'verifiedcolor', 'Checkmark Color', v.verifiedcolor)}}
|
||||
{{common.line_text_section('checkmark_text', '/settings/checkmark_text', 'checkmark-text', 'Checkmark Text', v.verified, 'Limit of 100 characters', 'Enter checkmark hover text here', 'Change Text', false, 0, 100, '.*', v.verified, false)}}
|
||||
|
||||
{% if FEATURES['PRONOUNS'] %}
|
||||
{{common.line_text_section('pronouns', '/settings/pronouns_change', 'pronouns', 'Pronouns', v.pronouns, 'Limit of 15 characters', 'Enter pronouns here', 'Change Pronouns', false, 3, 15, '([a-zA-Z]{1,7})/[a-zA-Z]{1,7}(/[a-zA-Z]{1,7})?', false)}}
|
||||
{% endif %}
|
||||
|
||||
{{common.line_text_section('flair', '/settings/title_change', 'title', 'Flair', v.customtitleplain, 'Limit of 100 characters', 'Enter a flair here', 'Change Flair', true, 0, 100, '.*', v.flairchanged)}}
|
||||
|
||||
{{common.color_section('flaircolor', '/settings/titlecolor', 'titlecolor', 'Flair Color', v.titlecolor)}}
|
||||
|
||||
{% if FEATURES['USERS_PROFILE_SONG'] -%}
|
||||
<div class="d-lg-flex border-bottom">
|
||||
<div class="title w-lg-25">
|
||||
|
@ -234,17 +235,32 @@
|
|||
</div>
|
||||
</div>
|
||||
{%- endif %}
|
||||
{# common.text_area_section(id, form_action, form_name, section_title, contents, below_text, placeholder_text, show_extras, show_file_upload, maxlength, show_if) #}
|
||||
{{common.text_area_section('profile-bio', '/settings/personal', 'bio', 'Bio', v.bio, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Tell the community a bit about yourself.', true, true, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, FEATURES['USERS_PROFILE_BODYTEXT'])}}
|
||||
{{common.text_area_section('profile-friends', '/settings/personal', 'friends', 'Friends', v.friends, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your friends on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, true)}}
|
||||
{{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT, true)}}
|
||||
{{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, false, 200, true)}}
|
||||
{# toggle_section(title, id, name, flag, below_text, disabled) #}
|
||||
|
||||
{% if FEATURES['USERS_PROFILE_BODYTEXT'] %}
|
||||
{{common.text_area_section('profile-bio', '/settings/personal', 'bio', 'Bio', v.bio, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Tell the community a bit about yourself.', true, true, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
|
||||
{% endif %}
|
||||
|
||||
{{common.text_area_section('profile-friends', '/settings/personal', 'friends', 'Friends', v.friends, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your friends on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
|
||||
|
||||
{{common.text_area_section('profile-enemies', '/settings/personal', 'enemies', 'Enemies', v.enemies, 'Limit of ' ~ BIO_FRIENDS_ENEMIES_LENGTH_LIMIT ~ ' characters', 'Enter your enemies on the site...', false, false, BIO_FRIENDS_ENEMIES_LENGTH_LIMIT)}}
|
||||
|
||||
{{common.text_area_section('profile-signature', '/settings/personal', 'sig', 'Signature', v.sig, 'Limit of 200 characters', 'Enter a signature...', true, false, 200)}}
|
||||
|
||||
{{common.toggle_section('Private Mode', 'privateswitch', 'private', v.is_private, 'This will hide your profile page from others.', false)}}
|
||||
{{common.toggle_section('Spider', 'spiderswitch', 'spider', v.spider, 'Have a spider friend accompany you during your journey on the site.', v.spider > 1)}}
|
||||
{{common.toggle_section('Marsify', 'marsify', 'marsify', v.marsify, 'Automatically insert relevant marseys into your future comments.', v.marsify > 1)}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="site-settings-checkmark-section" class="settings-section-section">
|
||||
<h5>Checkmark Customization</h5>
|
||||
<div class="settings-section rounded" id="site-settings-checkmark">
|
||||
{{common.color_section('verifiedcolor', '/settings/verifiedcolor', 'verifiedcolor', 'Checkmark Color', v.verifiedcolor)}}
|
||||
|
||||
{{common.line_text_section('checkmark_text', '/settings/checkmark_text', 'checkmark-text', 'Checkmark Hover Text', v.verified, 'Limit of 100 characters', 'Enter checkmark hover text here', 'Change Text', false, 0, 100, '.*', false)}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="site-settings-filters-section" class="settings-section-section">
|
||||
<h5>Filters</h5>
|
||||
<div class="settings-section rounded" id="site-settings-filters">
|
||||
|
|
Loading…
Reference in New Issue