diff --git a/public/scripts/upload.js b/public/scripts/upload.js index cb766c6..e23c08f 100644 --- a/public/scripts/upload.js +++ b/public/scripts/upload.js @@ -9,12 +9,14 @@ async function updateMediaType(attachmentsCount, attachmentListElem) { const mediaTypeElem = document.getElementById('media-type'); const spoilerMediaControl = document.querySelector('.spoiler-media-control'); const ghostPostMediaControl = document.querySelector('.ghost-post-media-control'); + const autoPublishTextMediaControl = document.querySelector('.auto-publish-text-media-control'); let mediaTypeDesc; if (attachmentsCount === 0) { mediaTypeDesc = 'Text 📝'; spoilerMediaControl.style.display = 'none'; ghostPostMediaControl.style.display = 'block'; + autoPublishTextMediaControl.style.display = 'block'; } else if (attachmentsCount === 1) { const singleAttachmentType = attachmentListElem.querySelector('select').value; @@ -22,10 +24,12 @@ async function updateMediaType(attachmentsCount, attachmentListElem) { else mediaTypeDesc = 'Video 🎬'; spoilerMediaControl.style.display = 'block'; ghostPostMediaControl.style.display = 'none'; + autoPublishTextMediaControl.style.display = 'none'; } else { mediaTypeDesc = 'Carousel 🎠'; spoilerMediaControl.style.display = 'block'; ghostPostMediaControl.style.display = 'none'; + autoPublishTextMediaControl.style.display = 'none'; } mediaTypeElem.innerText = mediaTypeDesc; diff --git a/views/upload.pug b/views/upload.pug index b6a0be3..970276c 100644 --- a/views/upload.pug +++ b/views/upload.pug @@ -113,11 +113,11 @@ block content br input#link-attachment(type='text' name='linkAttachment' value='') br - - label(for="autoPublishText") - input(type="checkbox" name="autoPublishText" id="autoPublishText") - | Auto-Publish (only for text posts) - br + div.auto-publish-text-media-control + label(for="autoPublishText") + input(type="checkbox" name="autoPublishText" id="autoPublishText") + | Auto-Publish (only for text posts) + br br div.ghost-post-media-control