Ghost/ghost/admin/app/templates/components/gh-task-button.hbs
Aileen Nowak c478564513 🎨 Publish menu wording and saving states improvements (#788)
closes TryGhost/Ghost#8696

- Changes the `gh-save-button` component to allow a custom `runningText` which would be rendered in the button when the current task is running.
- Adds a `runningText` CP to `gh-publishmenu` component, which will render (depending of post status and desired save type) 'Unpublishing', 'Publishing', 'Scheduling', 'Updating', 'Unpublishing', 'Rescheduling', and 'Unscheduling'.
2017-07-20 11:46:31 +01:00

16 lines
462 B
Handlebars

{{#if hasBlock}}
{{yield (hash
isIdle=isIdle
isRunning=isRunning
isSuccess=isSuccess
isFailure=isFailure
)}}
{{else}}
<span>
{{#if isRunning}}{{inline-svg "spinner" class="gh-icon-spinner"}}{{runningText}}{{/if}}
{{#if isIdle}}{{buttonText}}{{/if}}
{{#if isSuccess}}{{inline-svg "check-circle"}} {{successText}}{{/if}}
{{#if isFailure}}{{inline-svg "retry"}} {{failureText}}{{/if}}
</span>
{{/if}}