From 0338b9dc4aa3f123ad6303848e4c940d9877665d Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 29 Aug 2017 12:33:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=20Fixed=20post=20saving=20indic?= =?UTF-8?q?ator=20only=20indicating=20autosaves=20(#842)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs https://github.com/TryGhost/Ghost/issues/8932 - show "Saving..." text when autosave or manual save tasks are running - remove minimum period "Saving..." is shown for in tests --- ghost/admin/app/components/gh-editor-post-status.js | 5 ++++- ghost/admin/app/templates/editor/edit.hbs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghost/admin/app/components/gh-editor-post-status.js b/ghost/admin/app/components/gh-editor-post-status.js index 5625aa2480..3b9493f20e 100644 --- a/ghost/admin/app/components/gh-editor-post-status.js +++ b/ghost/admin/app/components/gh-editor-post-status.js @@ -1,10 +1,13 @@ import Component from '@ember/component'; +import Ember from 'ember'; import {computed} from '@ember/object'; import {reads} from '@ember/object/computed'; import {task, timeout} from 'ember-concurrency'; +const {testing} = Ember; + // TODO: reduce when in testing mode -const SAVE_TIMEOUT_MS = 3000; +const SAVE_TIMEOUT_MS = testing ? 0 : 3000; export default Component.extend({ post: null, diff --git a/ghost/admin/app/templates/editor/edit.hbs b/ghost/admin/app/templates/editor/edit.hbs index b0adf5736e..064115c559 100644 --- a/ghost/admin/app/templates/editor/edit.hbs +++ b/ghost/admin/app/templates/editor/edit.hbs @@ -8,7 +8,7 @@
{{gh-editor-post-status post=model - isSaving=autosave.isRunning + isSaving=(or autosave.isRunning saveTasks.isRunning) }}
{{#if scheduleCountdown}}