Updated feature image positioning in post history

No ref
This commit is contained in:
Sanne de Vries 2023-04-21 14:13:59 +01:00
parent f37d7a3fc7
commit d3a60c760b
3 changed files with 15 additions and 12 deletions

View File

@ -2,22 +2,25 @@
<div class="gh-post-history" {{did-insert this.onInsert}}>
<div class="gh-post-history-main">
<div class="gh-koenig-editor-pane flex flex-column mih-100 {{if this.showDifferences "show-diff" ""}}">
<div class="gh-editor-feature-image-container"></div>
{{#if (and this.diffHtml this.showDifferences (feature 'postDiffing'))}}
{{{this.diffHtml}}}
{{else if this.selectedHTML}}
{{{this.selectedHTML}}}
{{/if}}
{{#if (and this.diffHtml this.showDifferences (feature 'postDiffing'))}}
{{{this.diffHtml}}}
{{else if this.selectedHTML}}
{{{this.selectedHTML}}}
{{/if}}
<div class="gh-post-history-hidden-lexical previous">
<div class="gh-editor-feature-image">
<img src="{{this.comparisonRevision.feature_image}}">
<div class="gh-editor-feature-image-container">
<div class="gh-editor-feature-image">
<img src="{{this.comparisonRevision.feature_image}}">
</div>
</div>
<div class="gh-editor-title">{{this.previousTitle}}</div>
<KoenigLexicalEditor @lexical={{this.comparisonRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerComparisonEditorApi"}}/>
</div>
<div class="gh-post-history-hidden-lexical current">
<div class="gh-editor-feature-image">
<img src="{{this.selectedRevision.feature_image}}">
<div class="gh-editor-feature-image-container">
<div class="gh-editor-feature-image">
<img src="{{this.selectedRevision.feature_image}}">
</div>
</div>
<div class="gh-editor-title">{{this.currentTitle}}</div>
<KoenigLexicalEditor @lexical={{this.selectedRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerSelectedEditorApi"}}/>

View File

@ -30,7 +30,7 @@ export default class ModalPostHistory extends Component {
this.editorAPI = this.args.model.editorAPI;
this.toggleSettingsMenu = this.args.model.toggleSettingsMenu;
}
@tracked selectedHTML = `<h1>loading...</h1>`;
@tracked selectedHTML = null;
@tracked diffHtml = null;
@tracked showDifferences = this.feature.get('postDiffing'); // should default to true in future
@tracked selectedRevisionIndex = 0;

View File

@ -255,7 +255,7 @@
.modal-footer {
display: flex;
justify-content: flex-end;
margin-top: 20px;
margin-top: 3.2rem;
}
.modal-footer-spread {