mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05: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
1 changed files with 14 additions and 6 deletions
|
@ -145,14 +145,22 @@ export default class GhPostSettingsMenu extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
get canViewPostHistory() {
|
get canViewPostHistory() {
|
||||||
let showPostHistory = this.post.lexical !== null
|
// Can only view history for lexical posts
|
||||||
&& this.post.emailOnly === false;
|
if (this.post.lexical === null) {
|
||||||
|
return false;
|
||||||
if (this.post.isPublished === true) {
|
|
||||||
return showPostHistory && this.post.hasEmail === 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() {
|
willDestroyElement() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue