mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Added saved post status indicator behind labs flag
refs https://github.com/TryGhost/Team/issues/779 - add "- Saved" to status text in editor when a post has no unsaved changes - uses `savedIndicator` labs flag so we can test and tweak behaviour before go-live
This commit is contained in:
parent
2221c9d4cd
commit
1cfa0ae58e
4 changed files with 18 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
{{else if (eq @post.email.status "submitted")}}
|
||||
and sent to {{gh-pluralize @post.email.emailCount "member"}}
|
||||
{{/if}}
|
||||
{{if (not @hasDirtyAttributes) "- Saved"}}
|
||||
{{else if @post.isScheduled}}
|
||||
<time datetime="{{@post.publishedAtUTC}}" class="ml1 green f8" data-test-schedule-countdown>
|
||||
Will be published
|
||||
|
@ -16,9 +17,10 @@
|
|||
{{/if}}
|
||||
{{this.scheduledTime}}
|
||||
</time>
|
||||
{{if (not @hasDirtyAttributes) "- Saved"}}
|
||||
{{else if @post.isNew}}
|
||||
New
|
||||
{{else}}
|
||||
Draft
|
||||
Draft {{if (not @hasDirtyAttributes) "- Saved"}}
|
||||
{{/if}}
|
||||
</div>
|
|
@ -56,6 +56,7 @@ export default Service.extend({
|
|||
matchHelper: feature('matchHelper'),
|
||||
multipleProducts: feature('multipleProducts', {developer: true}),
|
||||
emailCardSegments: feature('emailCardSegments', {developer: true}),
|
||||
savedIndicator: feature('savedIndicator', {developer: true}),
|
||||
|
||||
_user: null,
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<span>
|
||||
<GhEditorPostStatus
|
||||
@post={{this.post}}
|
||||
@hasDirtyAttributes={{this.hasDirtyAttributes}}
|
||||
@isSaving={{or this.autosaveTask.isRunning this.saveTasks.isRunning}}
|
||||
/>
|
||||
</span>
|
||||
|
|
|
@ -280,6 +280,19 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-expandable-block">
|
||||
<div class="gh-expandable-header">
|
||||
<div>
|
||||
<h4 class="gh-expandable-title">Show saved state in editor</h4>
|
||||
<p class="gh-expandable-description">
|
||||
Post status in editor shows "- Saved" when a post has no unsaved changes
|
||||
</p>
|
||||
</div>
|
||||
<div class="for-switch">
|
||||
<GhFeatureFlag @flag="savedIndicator" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
Loading…
Add table
Reference in a new issue