From 04cd7deab7dac9b320ded695a1787a12645f05a5 Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Tue, 10 Nov 2020 07:52:57 +0000 Subject: [PATCH] Some kind of better categories for the board settings --- views/pages/managesettings.pug | 109 ++++++++++++++++++--------------- 1 file changed, 59 insertions(+), 50 deletions(-) diff --git a/views/pages/managesettings.pug b/views/pages/managesettings.pug index f246bf39..76f15358 100644 --- a/views/pages/managesettings.pug +++ b/views/pages/managesettings.pug @@ -34,12 +34,13 @@ block content input(type='checkbox', name='confirm', value='true' required) input(type='submit', value='submit') hr(size=1) - h4.no-m-p Settings: .form-wrapper.flexleft.mt-10 form.form-post(action=`/forms/board/${board._id}/settings` method='POST' enctype='application/x-www-form-urlencoded') input(type='hidden' name='_csrf' value=csrf) .row.wrap.sb .col.mr-5 + .row + h4.mv-5 Settings: .row .label Board name input(type='text' name='name' value=board.settings.name) @@ -56,8 +57,41 @@ block content .label Announcement textarea(name='announcement' placeholder='Supports post styling') #{board.settings.announcement.raw} .row - .label Anon Name - input(type='text' name='default_name' value=board.settings.defaultName) + .label Theme + select(name='theme') + each theme in themes + option(value=theme selected=board.settings.theme === theme) #{theme} + .row + .label Code Theme + select(name='code_theme') + each theme in codeThemes + option(value=theme selected=board.settings.codeTheme === theme) #{theme} + if globalLimits.customCss.enabled + .row + .label Custom CSS + textarea(name='custom_css' placeholder='Test first in top-right settings if you have javascript enabled' maxlength=globalLimits.customCss.max) #{board.settings.customCss} + .row + .label IDs + label.postform-style.ph-5 + input(type='checkbox', name='ids', value='true' checked=board.settings.ids) + .row + .label Geo Flags + label.postform-style.ph-5 + input(type='checkbox', name='flags', value='true' checked=board.settings.flags) + .row + .label SFW + label.postform-style.ph-5 + input(type='checkbox', name='sfw', value='true' checked=board.settings.sfw) + .row + .label Unlist locally + label.postform-style.ph-5 + input(type='checkbox', name='unlisted_local', value='true' checked=board.settings.unlistedLocal) + .row + .label Unlist from webring + label.postform-style.ph-5 + input(type='checkbox', name='unlisted_webring', value='true' checked=board.settings.unlistedWebring) + .row + h4.mv-5 File Options: .row .label Max Files input(type='number' name='max_files' value=board.settings.maxFiles max=globalLimits.postFiles.max) @@ -81,10 +115,6 @@ block content .label Allow Other Files label.postform-style.ph-5 input(type='checkbox', name='files_allow_other', value='true' checked=board.settings.allowedFileTypes.other) - .row - .label User Post Deletion - label.postform-style.ph-5 - input(type='checkbox', name='user_post_delete', value='true' checked=board.settings.userPostDelete) .row .label User File Spoilering label.postform-style.ph-5 @@ -93,6 +123,16 @@ block content .label User File Unlinking label.postform-style.ph-5 input(type='checkbox', name='user_post_unlink', value='true' checked=board.settings.userPostUnlink) + .col.mr-5 + .row + h4.mv-5 Post Options: + .row + .label Anon Name + input(type='text' name='default_name' value=board.settings.defaultName) + .row + .label User Post Deletion + label.postform-style.ph-5 + input(type='checkbox', name='user_post_delete', value='true' checked=board.settings.userPostDelete) .row .label Force Anon label.postform-style.ph-5 @@ -101,7 +141,6 @@ block content .label Sage Only Email label.postform-style.ph-5 input(type='checkbox', name='sage_only_email', value='true' checked=board.settings.sageOnlyEmail) - .col.mr-5 .row .label Force Thread Subject label.postform-style.ph-5 @@ -138,6 +177,8 @@ block content .row .label Max Reply Message Length input(type='number' name='max_reply_message_length' value=board.settings.maxReplyMessageLength max=globalLimits.fieldLength.message) + .row + h4.mv-5 Limits: .row .label Thread Limit input(type='number' name='thread_limit' value=board.settings.threadLimit min=globalLimits.threadLimit.min max=globalLimits.threadLimit.max) @@ -147,20 +188,6 @@ block content .row .label Bump Limit input(type='number' name='bump_limit' value=board.settings.bumpLimit min=globalLimits.bumpLimit.min max=globalLimits.bumpLimit.max) - .row - .label IDs - label.postform-style.ph-5 - input(type='checkbox', name='ids', value='true' checked=board.settings.ids) - .row - .label Geo Flags - label.postform-style.ph-5 - input(type='checkbox', name='flags', value='true' checked=board.settings.flags) - .row - .label Lock Mode - select(name='lock_mode') - option(value='0', selected=board.settings.lockMode === 0) Unlocked - option(value='1', selected=board.settings.lockMode === 1) Lock thread creation - option(value='2', selected=board.settings.lockMode === 2) Lock board .row .label Enforce Unique Files select(name='file_r9k_mode') @@ -173,33 +200,15 @@ block content option(value='0', selected=board.settings.messageR9KMode === 0) Off option(value='1', selected=board.settings.messageR9KMode === 1) Per Thread option(value='2', selected=board.settings.messageR9KMode === 2) Board Wide - .row - .label Unlist locally - label.postform-style.ph-5 - input(type='checkbox', name='unlisted_local', value='true' checked=board.settings.unlistedLocal) - .row - .label Unlist from webring - label.postform-style.ph-5 - input(type='checkbox', name='unlisted_webring', value='true' checked=board.settings.unlistedWebring) - .row - .label SFW - label.postform-style.ph-5 - input(type='checkbox', name='sfw', value='true' checked=board.settings.sfw) .col.w900 .row - .label Theme - select(name='theme') - each theme in themes - option(value=theme selected=board.settings.theme === theme) #{theme} + h4.mv-5 Antispam: .row - .label Code Theme - select(name='code_theme') - each theme in codeThemes - option(value=theme selected=board.settings.codeTheme === theme) #{theme} - if globalLimits.customCss.enabled - .row - .label Custom CSS - textarea(name='custom_css' placeholder='Test first in top-right settings if you have javascript enabled' maxlength=globalLimits.customCss.max) #{board.settings.customCss} + .label Lock Mode + select(name='lock_mode') + option(value='0', selected=board.settings.lockMode === 0) Unlocked + option(value='1', selected=board.settings.lockMode === 1) Lock thread creation + option(value='2', selected=board.settings.lockMode === 2) Lock board .row .label Captcha Mode select(name='captcha_mode') @@ -228,13 +237,13 @@ block content .label Early 404 label.postform-style.ph-5 input(type='checkbox', name='early404', value='true' checked=board.settings.early404) - .row - .label Blocked Countries - include ../includes/2charisocountries.pug .row .label Disable .onion file posting label.postform-style.ph-5 input(type='checkbox', name='disable_onion_file_posting', value='true' checked=board.settings.disableOnionFilePosting) + .row + .label Blocked Countries + include ../includes/2charisocountries.pug .row .label Filters textarea(name='filters' placeholder='Newline separated, max 50') #{board.settings.filters.join('\n')} @@ -252,4 +261,4 @@ block content .label Filter Auto Ban Duration input(type='text' name='ban_duration' placeholder='e.g. 1w' value=board.settings.filterBanDuration) - input.row(type='submit', value='save settings') + input.row(type='submit', value='Save')