mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Added feature_image to the post history modal
This allows us to diff and review previous revisions feature images
This commit is contained in:
parent
cddf786424
commit
f33f9cc530
4 changed files with 9 additions and 0 deletions
|
@ -9,10 +9,16 @@
|
||||||
{{{this.selectedHTML}}}
|
{{{this.selectedHTML}}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="gh-post-history-hidden-lexical previous">
|
<div class="gh-post-history-hidden-lexical previous">
|
||||||
|
<div class="gh-editor-feature-image">
|
||||||
|
<img src="{{this.comparisonRevision.feature_image}}">
|
||||||
|
</div>
|
||||||
<div class="gh-editor-title">{{this.previousTitle}}</div>
|
<div class="gh-editor-title">{{this.previousTitle}}</div>
|
||||||
<KoenigLexicalEditor @lexical={{this.comparisonRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerComparisonEditorApi"}}/>
|
<KoenigLexicalEditor @lexical={{this.comparisonRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerComparisonEditorApi"}}/>
|
||||||
</div>
|
</div>
|
||||||
<div class="gh-post-history-hidden-lexical current">
|
<div class="gh-post-history-hidden-lexical current">
|
||||||
|
<div class="gh-editor-feature-image">
|
||||||
|
<img src="{{this.selectedRevision.feature_image}}">
|
||||||
|
</div>
|
||||||
<div class="gh-editor-title">{{this.currentTitle}}</div>
|
<div class="gh-editor-title">{{this.currentTitle}}</div>
|
||||||
<KoenigLexicalEditor @lexical={{this.selectedRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerSelectedEditorApi"}}/>
|
<KoenigLexicalEditor @lexical={{this.selectedRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerSelectedEditorApi"}}/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -59,6 +59,7 @@ export default class ModalPostHistory extends Component {
|
||||||
latest: index === 0,
|
latest: index === 0,
|
||||||
createdAt: revision.get('createdAt'),
|
createdAt: revision.get('createdAt'),
|
||||||
title: revision.get('title'),
|
title: revision.get('title'),
|
||||||
|
feature_image: revision.get('featureImage'),
|
||||||
author: {
|
author: {
|
||||||
name: revision.get('author.name')
|
name: revision.get('author.name')
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ export default class PostRevisionModel extends Model {
|
||||||
@belongsTo('post') post;
|
@belongsTo('post') post;
|
||||||
@attr('string') lexical;
|
@attr('string') lexical;
|
||||||
@attr('string') title;
|
@attr('string') title;
|
||||||
|
@attr('string') featureImage;
|
||||||
@attr('moment-utc') createdAt;
|
@attr('moment-utc') createdAt;
|
||||||
@belongsTo('user') author;
|
@belongsTo('user') author;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ export default class PostRevisionSerializer extends ApplicationSerializer.extend
|
||||||
lexical: {key: 'lexical'},
|
lexical: {key: 'lexical'},
|
||||||
title: {key: 'title'},
|
title: {key: 'title'},
|
||||||
createdAt: {key: 'created_at'},
|
createdAt: {key: 'created_at'},
|
||||||
|
featureImage: {key: 'feature_image'},
|
||||||
postIdLocal: {key: 'post_id'}
|
postIdLocal: {key: 'post_id'}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue