mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
b71babfc51
no issue - bumped `ember-source`, `ember-data`, and `ember-cli` to latest 3.22.x versions - fixed errors caused by updating properties inside of a render - `<GhPublishMenu>` removed insta-call of `@setSaveType` when rendering sub-components in favour of pre-setting the default `@saveType` value when the underlying post status changes - updated `<GhNavMenu>` to use the run-loop to update the `firstRender` property once rendering has finished rather than mid-render
65 lines
3.4 KiB
Handlebars
65 lines
3.4 KiB
Handlebars
<div ...attributes>
|
|
<header class="gh-publishmenu-heading">Ready to
|
|
{{#if @canSendEmail}}
|
|
<GhDistributionActionSelect
|
|
@distributionAction={{@distributionAction}}
|
|
@setDistributionAction={{@setDistributionAction}}
|
|
/>
|
|
{{else}}
|
|
publish
|
|
{{/if}}
|
|
this {{@post.displayName}}?
|
|
</header>
|
|
<section class="gh-publishmenu-content">
|
|
<div class="gh-publishmenu-section">
|
|
<div class="gh-publishmenu-radio {{if (eq @saveType "publish") "active"}}" {{on "click" (fn this.setSaveType "publish")}}>
|
|
<div class="gh-publishmenu-radio-button" data-test-publishmenu-published-option></div>
|
|
<div class="gh-publishmenu-radio-content">
|
|
<div class="gh-publishmenu-radio-label">{{#if @emailOnly}}Send email now{{else}}Set it live now{{/if}}</div>
|
|
<div class="gh-publishmenu-radio-desc">{{#if @emailOnly}}Deliver this immediately{{else}}Publish this {{@post.displayName}} immediately{{/if}}</div>
|
|
</div>
|
|
</div>
|
|
<div class="gh-publishmenu-radio {{if (eq @saveType "schedule") "active"}}" {{on "click" (fn this.setSaveType "schedule")}}>
|
|
<div class="gh-publishmenu-radio-button" data-test-publishmenu-scheduled-option></div>
|
|
<div class="gh-publishmenu-radio-content">
|
|
<div class="gh-publishmenu-radio-label">Schedule it for later</div>
|
|
<GhDateTimePicker
|
|
@date={{@post.publishedAtBlogDate}}
|
|
@time={{@post.publishedAtBlogTime}}
|
|
@setDate={{this.setDate}}
|
|
@setTime={{this.setTime}}
|
|
@setTypedDateError={{@setTypedDateError}}
|
|
@errors={{@post.errors}}
|
|
@dateErrorProperty="publishedAtBlogDate"
|
|
@timeErrorProperty="publishedAtBlogTime"
|
|
@minDate={{this._minDate}}
|
|
@isActive={{eq @saveType "schedule"}}
|
|
/>
|
|
<div class="gh-publishmenu-radio-desc">{{#if @emailOnly}}Send email at a specific time{{else}}Set automatic future publish date{{/if}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{{#if this.showEmailSection}}
|
|
<div class="gh-publishmenu-section" {{did-insert (perform this.countTotalMembersTask)}}>
|
|
<div class="gh-publishmenu-email">
|
|
{{#if @isSendingEmailLimited}}
|
|
<p class="gh-box gh-box-alert">{{html-safe @sendingEmailLimitError}}</p>
|
|
{{else}}
|
|
<div class="gh-publishmenu-email-label {{if this.disableEmailOption "pe-none"}}">
|
|
<label class="gh-publishmenu-radio-label mb3 {{if this.disableEmailOption "midgrey"}}">Send by email to</label>
|
|
|
|
<div class="form-group">
|
|
<GhMembersRecipientSelect
|
|
@filter={{@recipientsFilter}}
|
|
@onChange={{@setSendEmailWhenPublished}}
|
|
@disabled={{this.disableEmailOption}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</section>
|
|
</div> |