mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
🐛 Fixed Post History for posts sent as an email (#16999)
refs https://github.com/TryGhost/Team/issues/3458 From the discussion in slack, for all published/sent posts: Published only --> view history & restore Published & sent --> view history & restore Email only --> history hidden And for all unpublished/unsent posts: All states --> view history & restore.
This commit is contained in:
parent
e990bf5a94
commit
8cb8b84786
@ -145,14 +145,22 @@ export default class GhPostSettingsMenu extends Component {
|
||||
}
|
||||
|
||||
get canViewPostHistory() {
|
||||
let showPostHistory = this.post.lexical !== null
|
||||
&& this.post.emailOnly === false;
|
||||
|
||||
if (this.post.isPublished === true) {
|
||||
return showPostHistory && this.post.hasEmail === false;
|
||||
// Can only view history for lexical posts
|
||||
if (this.post.lexical === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return showPostHistory;
|
||||
// Can view history for all unpublished/unsent posts
|
||||
if (!this.post.isPublished && !this.post.isSent) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Cannot view history for published posts if there isn't a web version
|
||||
if (this.post.emailOnly) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
willDestroyElement() {
|
||||
|
Loading…
Reference in New Issue
Block a user