File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -9,23 +9,27 @@ async function updateMediaType(attachmentsCount, attachmentListElem) {
99 const mediaTypeElem = document . getElementById ( 'media-type' ) ;
1010 const spoilerMediaControl = document . querySelector ( '.spoiler-media-control' ) ;
1111 const ghostPostMediaControl = document . querySelector ( '.ghost-post-media-control' ) ;
12+ const autoPublishTextMediaControl = document . querySelector ( '.auto-publish-text-media-control' ) ;
1213
1314 let mediaTypeDesc ;
1415 if ( attachmentsCount === 0 ) {
1516 mediaTypeDesc = 'Text 📝' ;
1617 spoilerMediaControl . style . display = 'none' ;
1718 ghostPostMediaControl . style . display = 'block' ;
19+ autoPublishTextMediaControl . style . display = 'block' ;
1820 } else if ( attachmentsCount === 1 ) {
1921 const singleAttachmentType =
2022 attachmentListElem . querySelector ( 'select' ) . value ;
2123 if ( singleAttachmentType === 'Image' ) mediaTypeDesc = 'Image 🖼️' ;
2224 else mediaTypeDesc = 'Video 🎬' ;
2325 spoilerMediaControl . style . display = 'block' ;
2426 ghostPostMediaControl . style . display = 'none' ;
27+ autoPublishTextMediaControl . style . display = 'none' ;
2528 } else {
2629 mediaTypeDesc = 'Carousel 🎠' ;
2730 spoilerMediaControl . style . display = 'block' ;
2831 ghostPostMediaControl . style . display = 'none' ;
32+ autoPublishTextMediaControl . style . display = 'none' ;
2933 }
3034
3135 mediaTypeElem . innerText = mediaTypeDesc ;
Original file line number Diff line number Diff line change @@ -113,11 +113,11 @@ block content
113113 br
114114 input#link-attachment ( type ='text' name ='linkAttachment' value ='' )
115115 br
116-
117- label( for ="autoPublishText" )
118- input( type ="checkbox" name ="autoPublishText" id ="autoPublishText" )
119- | Auto-Publish (only for text posts)
120- br
116+ div .auto-publish-text-media-control
117+ label( for ="autoPublishText" )
118+ input( type ="checkbox" name ="autoPublishText" id ="autoPublishText" )
119+ | Auto-Publish (only for text posts)
120+ br
121121
122122 br
123123 div.ghost-post-media-control
You can’t perform that action at this time.
0 commit comments