0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Adjusted CMD+P in editor to open preview modal when post is a draft

refs https://github.com/TryGhost/Team/issues/459

- for draft posts we have a new preview modal so the preview shortcut should use that too
This commit is contained in:
Kevin Ansfield 2021-02-12 09:34:09 +00:00
parent 5a8753fb8f
commit 98073637d7

View file

@ -56,7 +56,11 @@ export default AuthenticatedRoute.extend(ShortcutsRoute, {
},
preview() {
window.open(this.controller.post.previewUrl, '_blank', 'noopener');
if (this.controller.post.isDraft) {
this.controller.send('togglePostPreviewModal');
} else {
window.open(this.controller.post.previewUrl, '_blank', 'noopener');
}
},
authorizationFailed() {