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:
parent
5a8753fb8f
commit
98073637d7
1 changed files with 5 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue