From f33f9cc5309285b9bd5667496402f4d0df631d73 Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Fri, 21 Apr 2023 13:20:01 +0100 Subject: [PATCH] Added feature_image to the post history modal This allows us to diff and review previous revisions feature images --- ghost/admin/app/components/modal-post-history.hbs | 6 ++++++ ghost/admin/app/components/modal-post-history.js | 1 + ghost/admin/app/models/post-revision.js | 1 + ghost/admin/app/serializers/post-revision.js | 1 + 4 files changed, 9 insertions(+) diff --git a/ghost/admin/app/components/modal-post-history.hbs b/ghost/admin/app/components/modal-post-history.hbs index a4ca339bad..1764fd6249 100644 --- a/ghost/admin/app/components/modal-post-history.hbs +++ b/ghost/admin/app/components/modal-post-history.hbs @@ -9,10 +9,16 @@ {{{this.selectedHTML}}} {{/if}}
+
+ +
{{this.currentTitle}}
diff --git a/ghost/admin/app/components/modal-post-history.js b/ghost/admin/app/components/modal-post-history.js index 11d9c775cf..f29279c616 100644 --- a/ghost/admin/app/components/modal-post-history.js +++ b/ghost/admin/app/components/modal-post-history.js @@ -59,6 +59,7 @@ export default class ModalPostHistory extends Component { latest: index === 0, createdAt: revision.get('createdAt'), title: revision.get('title'), + feature_image: revision.get('featureImage'), author: { name: revision.get('author.name') } diff --git a/ghost/admin/app/models/post-revision.js b/ghost/admin/app/models/post-revision.js index 0c29fa48a4..d6e73df410 100644 --- a/ghost/admin/app/models/post-revision.js +++ b/ghost/admin/app/models/post-revision.js @@ -4,6 +4,7 @@ export default class PostRevisionModel extends Model { @belongsTo('post') post; @attr('string') lexical; @attr('string') title; + @attr('string') featureImage; @attr('moment-utc') createdAt; @belongsTo('user') author; } diff --git a/ghost/admin/app/serializers/post-revision.js b/ghost/admin/app/serializers/post-revision.js index 593e6f4e4c..fe4a043f3b 100644 --- a/ghost/admin/app/serializers/post-revision.js +++ b/ghost/admin/app/serializers/post-revision.js @@ -9,6 +9,7 @@ export default class PostRevisionSerializer extends ApplicationSerializer.extend lexical: {key: 'lexical'}, title: {key: 'title'}, createdAt: {key: 'created_at'}, + featureImage: {key: 'feature_image'}, postIdLocal: {key: 'post_id'} }; }