ghost 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2161,7 +2161,7 @@ return t.save().then((()=>(this.notifications.closeAlerts("snippet.save"),this.n
|
|
|
2161
2161
|
e?this.set("snippetToUpdate",{snippetRecord:e,updatedProperties:t}):this.set("snippetToUpdate",null)}updateSnippet(){if(!this.snippetToUpdate)return Promise.reject()
|
|
2162
2162
|
const{snippetRecord:e,updatedProperties:{mobiledoc:t}}=this.snippetToUpdate
|
|
2163
2163
|
return e.set("mobiledoc",t),e.save().then((()=>(this.set("snippetToUpdate",null),this.notifications.closeAlerts("snippet.save"),this.notifications.showNotification(`Snippet "${e.name}" updated`,{type:"success"}),e))).catch((t=>{throw e.errors.isEmpty||this.notifications.showAlert(`Snippet save failed: ${e.errors.messages.join(". ")}`,{type:"error",key:"snippet.save"}),e.rollbackAttributes(),t}))}toggleDeleteSnippetModal(e){this.set("snippetToDelete",e)}deleteSnippet(e){return e.destroyRecord()}*autosaveTask(){if(!this.get("saveTask.isRunning"))return yield this.saveTask.perform({silent:!0,backgroundSave:!0})}*saveTask(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.get("post.status"),i=this.get("post.isNew")
|
|
2164
|
-
if(this.cancelAutosave(),!t.backgroundSave||this.hasDirtyAttributes){e=t.backgroundSave?"draft":this.get("post.pastScheduledTime")?this.willSchedule||this.willPublish?"published":"draft":this.willPublish&&!this.get("post.isScheduled")?"published":this.willSchedule&&!this.get("post.isPublished")?"scheduled":this.get("post.isSent")?"sent":"draft",this.set("post.status",e),yield this.beforeSaveTask.perform()
|
|
2164
|
+
if(this.cancelAutosave(),!t.backgroundSave||this.hasDirtyAttributes){e=t.backgroundSave?"draft":this.get("post.pastScheduledTime")?this.willSchedule||this.willPublish?"published":"draft":this.willPublish&&!this.get("post.isScheduled")?"published":this.willSchedule&&!this.get("post.isPublished")?"scheduled":this.get("post.isSent")?"sent":"draft",this.set("post.status",e),yield this.beforeSaveTask.perform(t)
|
|
2165
2165
|
try{let e=yield this._savePostTask.perform(t)
|
|
2166
2166
|
return e.set("statusScratch",null),t.silent||this._showSaveNotification(n,e.get("status"),!!i),i&&e.get("id")?(this.leaveEditorTransition||this.replaceRoute("editor.edit",e),!0):e}catch(r){if(this.showReAuthenticateModal)return this._reauthSave=!0,void(this._reauthSaveOptions=t)
|
|
2167
2167
|
if(this.set("post.status",n),void 0===r&&0===this.post.errors.length)return
|
|
@@ -4282,4 +4282,4 @@ var t=Ember.Component.extend({})
|
|
|
4282
4282
|
e.default=t})),define("ghost-admin/config/environment",[],(function(){try{var e="ghost-admin/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(decodeURIComponent(t))}
|
|
4283
4283
|
return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(i){throw new Error('Could not read config from meta tag with name "'+e+'".')}})),runningTests||require("ghost-admin/app").default.create({version:"5.0",name:"ghost-admin"})
|
|
4284
4284
|
|
|
4285
|
-
//# sourceMappingURL=ghost.min-
|
|
4285
|
+
//# sourceMappingURL=ghost.min-b37a2752b0abda202c14c948b8bc3587.map
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
<script src="assets/vendor.min-2bca41946dea27dc292428db605d466d.js"></script>
|
|
60
|
-
<script src="assets/ghost.min-
|
|
60
|
+
<script src="assets/ghost.min-b37a2752b0abda202c14c948b8bc3587.js"></script>
|
|
61
61
|
|
|
62
62
|
</body>
|
|
63
63
|
</html>
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
<script src="assets/vendor.min-2bca41946dea27dc292428db605d466d.js"></script>
|
|
60
|
-
<script src="assets/ghost.min-
|
|
60
|
+
<script src="assets/ghost.min-b37a2752b0abda202c14c948b8bc3587.js"></script>
|
|
61
61
|
|
|
62
62
|
</body>
|
|
63
63
|
</html>
|