Put email post toggle behind members feature flag

This commit is contained in:
Kevin Ansfield 2019-11-04 13:38:30 +07:00
parent 7866546fab
commit 6419222f31
2 changed files with 15 additions and 11 deletions

View File

@ -1,8 +1,10 @@
import Component from '@ember/component';
import moment from 'moment';
import {isEmpty} from '@ember/utils';
import {inject as service} from '@ember/service';
export default Component.extend({
feature: service(),
post: null,
saveType: null,

View File

@ -24,16 +24,18 @@
<div class="gh-publishmenu-radio-desc">Set automatic future publish date</div>
</div>
</div>
<div class="flex mb4">
<div class="for-switch mr3">
<label class="switch" for="email-when-published-checkbox">
<Input @checked={{this.post.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox" @name="email-when-published" />
<span class="input-toggle-component"></span>
</label>
{{#if this.feature.labs.members}}
<div class="flex mb4">
<div class="for-switch mr3">
<label class="switch" for="email-when-published-checkbox">
<Input @checked={{this.post.sendEmailWhenPublished}} @type="checkbox" @id="email-when-published-checkbox" @name="email-when-published" />
<span class="input-toggle-component"></span>
</label>
</div>
<div class="flex-grow-1">
<div class="gh-publishmenu-radio-label">Email to members</div>
<div class="gh-publishmenu-radio-desc">Send email when published</div>
</div>
</div>
<div class="flex-grow-1">
<div class="gh-publishmenu-radio-label">Email to members</div>
<div class="gh-publishmenu-radio-desc">Send email when published</div>
</div>
</div>
{{/if}}
</section>