From 6b437d7159cd78c17fd8c2d7719a19f27ac0c6fc Mon Sep 17 00:00:00 2001 From: Thomas Lynch Date: Sat, 27 Aug 2022 17:42:51 +1000 Subject: [PATCH] Dont show replayable option if other files disabled on board Rebuild board pages on file type for image/other changes, to account for tegaki in postform changes --- models/forms/changeboardsettings.js | 2 ++ views/includes/postform.pug | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/models/forms/changeboardsettings.js b/models/forms/changeboardsettings.js index 44055ede..9d7ad42b 100644 --- a/models/forms/changeboardsettings.js +++ b/models/forms/changeboardsettings.js @@ -27,6 +27,8 @@ const { Boards, Posts } = require(__dirname+'/../../db/') 'codetheme': ['board', 'threads', 'catalog', 'other'], 'announcement.raw': ['board', 'threads', 'catalog', 'other'], 'customCss': ['board', 'threads', 'catalog', 'other'], + 'allowedFileTypes.other': ['board', 'threads', 'catalog'], + 'allowedFileTypes.image': ['board', 'threads', 'catalog'], 'enableTegaki': ['board', 'threads', 'catalog'], 'hideBanners': ['board', 'threads', 'catalog'], }); diff --git a/views/includes/postform.pug b/views/includes/postform.pug index 5ad9a240..101ce264 100644 --- a/views/includes/postform.pug +++ b/views/includes/postform.pug @@ -65,9 +65,10 @@ section.form-wrapper.flex-center section.row.jsonly .label Tegaki input.dummy-link.tegaki-button(type='button', value='Draw') - label.noselect.postform-style.ph-5.ml-1.fh - input(type='checkbox' name='tegakireplay') - | Replayable? + if board.settings.allowedFileTypes.other === true + label.noselect.postform-style.ph-5.ml-1.fh + input(type='checkbox' name='tegakireplay') + | Replayable? if board.settings.userPostSpoiler || board.settings.userPostDelete || board.settings.userPostUnlink || modview section.row .label Password