Ghost/ghost/admin/app/components/editor-labs/publish-management.hbs
Kevin Ansfield f8084f69dc Fixed flash of "Save" button after save has completed
refs https://github.com/TryGhost/Team/issues/1597

- disabled automatic reset of the `<GhTaskButton>` used for saving so we don't have conflicting timeouts (button state auto reset is 2.5sec, display of save button before it's removed is 3sec)
2022-05-10 11:32:06 +01:00

35 lines
1.0 KiB
Handlebars

{{#if @post.isDraft}}
<button
type="button"
class="gh-btn gh-btn-editor darkgrey gh-publishmenu-trigger"
{{on "click" this.openPublishFlow}}
{{on-key "cmd+shift+p"}}
disabled={{this.publishOptions.isLoading}}
data-test-button="publish-flow"
>
<span>Publish</span>
</button>
{{else}}
{{#if (or @hasUnsavedChanges this.saveButtonTaskGroup.isRunning)}}
<GhTaskButton
@task={{this.saveTask}}
@runningText="Saving..."
@class="gh-btn gh-btn-editor gh-publishmenu-trigger"
@idleClass="green"
@runningClass="midlightgrey"
@successClass="midlightgrey"
@failureClass="red"
@showIcon={{false}}
@autoReset={{false}}
/>
{{/if}}
<button
type="button"
class="gh-btn gh-btn-editor darkgrey gh-publishmenu-trigger"
{{on "click" this.openUpdateFlow}}
data-test-button="update-flow"
>
<span>Update</span>
</button>
{{/if}}