0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Updated button label logic to match different states

This commit is contained in:
Djordje Vlaisavljevic 2022-05-17 17:23:45 +02:00
parent bcef562206
commit a021553203

View file

@ -59,14 +59,36 @@
{{/if}}
<div class="gh-publish-cta">
<GhTaskButton
@task={{this.confirmTask}}
@buttonText={{this.confirmButtonText}}
@runningText={{if @publishOptions.willOnlyEmail "Sending" "Publishing"}}
@successText={{if @publishOptions.willOnlyEmail "Sent" "Published"}}
@class="gh-btn gh-btn-large"
@idleClass="gh-btn-pulse"
@showIcon={{false}}
/>
{{#if @publishOptions.willOnlyEmail}}
<GhTaskButton
@task={{this.confirmTask}}
@buttonText={{this.confirmButtonText}}
@runningText="Sending"
@successText="Sent"
@class="gh-btn gh-btn-large"
@idleClass="gh-btn-pulse"
@showIcon={{false}}
/>
{{else if this.willEmail}}
<GhTaskButton
@task={{this.confirmTask}}
@buttonText={{this.confirmButtonText}}
@runningText="Publishing & sending"
@successText="Published & sent"
@class="gh-btn gh-btn-large"
@idleClass="gh-btn-pulse"
@showIcon={{false}}
/>
{{else}}
<GhTaskButton
@task={{this.confirmTask}}
@buttonText={{this.confirmButtonText}}
@runningText="Publishing"
@successText="Published"
@class="gh-btn gh-btn-large"
@idleClass="gh-btn-pulse"
@showIcon={{false}}
/>
{{/if}}
<button type="button" class="gh-btn gh-btn-link gh-btn-large gh-publish-cta-secondary" {{on "click" @cancel}}>Back to settings</button>
</div>