Added preview modal toggle in publish menu

This commit is contained in:
Rish 2019-11-07 10:54:26 +07:00
parent f98920aa12
commit 80d58f99cb
5 changed files with 20 additions and 0 deletions

View File

@ -55,6 +55,10 @@ export default Component.extend({
}
},
toggleEmailPreviewModal() {
this.toggleEmailPreviewModal();
},
setDate(date) {
let post = this.post;
let dateString = moment(date).format('YYYY-MM-DD');

View File

@ -154,6 +154,10 @@ export default Component.extend({
}
},
toggleEmailPreviewModal() {
this.toggleEmailPreviewModal();
},
close(dropdown, e) {
let post = this.post;

View File

@ -50,6 +50,16 @@
{{/unless}}
{{/if}}
</div>
{{#unless this.deliveredAction}}
<div class="gh-publishmenu-preview-button">
<button type="button" class="gh-btn gh-btn-link gh-preview-email-button" onclick={{action "toggleEmailPreviewModal"}}
data-test-button="toggle-email-preview">
<span class="blue">
Preview in browser
</span>
</button>
</div>
{{/unless}}
{{/if}}
</section>

View File

@ -27,6 +27,7 @@
backgroundTask=this.backgroundTask
deliveredAction=this.deliveredAction
memberCount=this.memberCount
toggleEmailPreviewModal=(action "toggleEmailPreviewModal")
sendEmailWhenPublished=this.sendEmailWhenPublishedScratch}}
{{/if}}

View File

@ -58,6 +58,7 @@
onOpen=(action "cancelAutosave")
backgroundTask=this.backgroundLoader
deliveredAction=this.deliveredAction
toggleEmailPreviewModal=(action "toggleEmailPreviewModal")
memberCount=this.memberCount}}
{{/if}}
{{/unless}}