2023-04-17 17:25:52 +03:00
|
|
|
{{!-- template-lint-disable no-invalid-interactive --}}
|
2023-04-17 18:40:32 +03:00
|
|
|
<div class="gh-post-history">
|
|
|
|
<div class="gh-post-history-main">
|
2023-04-19 15:07:51 +03:00
|
|
|
<div class="gh-koenig-editor-pane flex flex-column mih-100">
|
|
|
|
<div class="gh-editor-feature-image-container">
|
|
|
|
<div class="gh-editor-feature-image-dropzone"></div>
|
|
|
|
<div class="flex flex-row items-center invisible">
|
|
|
|
<button type="button" class="gh-editor-feature-image-add-button">{{svg-jar "plus"}}<span>Add feature image</span></button>
|
|
|
|
<button type="button" class="gh-editor-feature-image-unsplash">{{svg-jar "unsplash"}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{#if this.diffHtml}}
|
2023-04-19 19:38:16 +03:00
|
|
|
{{#if this.showDifferences}}
|
2023-04-19 15:07:51 +03:00
|
|
|
{{{this.diffHtml}}}
|
2023-04-19 19:38:16 +03:00
|
|
|
{{/if}}
|
2023-04-19 15:07:51 +03:00
|
|
|
{{/if}}
|
2023-04-19 19:38:16 +03:00
|
|
|
|
|
|
|
{{#unless this.showDifferences}}
|
|
|
|
{{#if this.selectedHTML}}
|
|
|
|
{{{this.selectedHTML}}}
|
|
|
|
{{/if}}
|
|
|
|
{{/unless}}
|
|
|
|
|
2023-04-19 15:07:51 +03:00
|
|
|
<div class="gh-post-history-hidden-lexical previous">
|
|
|
|
<div class="gh-editor-title">{{this.previousTitle}}</div>
|
2023-04-19 14:24:38 +03:00
|
|
|
<KoenigLexicalEditor @lexical={{this.comparisonRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerComparisonEditorApi"}}/>
|
2023-04-19 15:07:51 +03:00
|
|
|
</div>
|
|
|
|
<div class="gh-post-history-hidden-lexical current">
|
|
|
|
<div class="gh-editor-title">{{this.currentTitle}}</div>
|
2023-04-19 14:24:38 +03:00
|
|
|
<KoenigLexicalEditor @lexical={{this.selectedRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerSelectedEditorApi"}}/>
|
2023-04-19 15:07:51 +03:00
|
|
|
</div>
|
2023-04-18 16:32:01 +03:00
|
|
|
</div>
|
2023-04-17 17:25:52 +03:00
|
|
|
</div>
|
2023-04-18 14:10:51 +03:00
|
|
|
<div class="settings-menu-container">
|
|
|
|
<div class="settings-menu settings-menu-pane settings-menu-pane-main">
|
2023-04-19 19:56:06 +03:00
|
|
|
<div class="settings-menu-header-wrapper">
|
|
|
|
<div class="settings-menu-header subview">
|
2023-04-20 13:43:22 +03:00
|
|
|
<button
|
|
|
|
aria-label="Close meta data panel"
|
|
|
|
class="back settings-menu-header-action"
|
|
|
|
data-test-button="close-psm-subview"
|
2023-04-19 19:56:06 +03:00
|
|
|
type="button" {{action "closeModal"}}
|
|
|
|
{{on "mousedown" (optional this.noop)}}
|
2023-04-20 13:43:22 +03:00
|
|
|
>
|
2023-04-19 19:56:06 +03:00
|
|
|
{{svg-jar "arrow-left"}}
|
|
|
|
<span class="hidden">Back</span>
|
|
|
|
</button>
|
|
|
|
<h4>Post history</h4>
|
|
|
|
</div>
|
2023-04-20 16:15:59 +03:00
|
|
|
{{#if (feature 'postDiffing')}}
|
2023-04-18 14:10:51 +03:00
|
|
|
<ul class="nav-list">
|
2023-04-19 19:56:06 +03:00
|
|
|
<li class="nav-list-item compare-versions">
|
2023-04-19 16:55:32 +03:00
|
|
|
<div class="for-switch x-small">
|
|
|
|
<label class="switch">
|
2023-04-19 19:56:06 +03:00
|
|
|
<span>Compare with previous version</span>
|
2023-04-19 16:55:32 +03:00
|
|
|
<span class="gh-toggle-featured">
|
2023-04-19 19:38:16 +03:00
|
|
|
<input {{on "click" (fn this.toggleDifferences '')}} type="checkbox" checked={{this.showDifferences}}>
|
2023-04-19 16:55:32 +03:00
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
2023-04-19 19:38:16 +03:00
|
|
|
</li>
|
2023-04-19 19:56:06 +03:00
|
|
|
</ul>
|
2023-04-20 16:15:59 +03:00
|
|
|
{{/if}}
|
2023-04-19 19:56:06 +03:00
|
|
|
</div>
|
|
|
|
<div class="settings-menu-content">
|
|
|
|
<ul class="nav-list">
|
2023-04-19 14:24:38 +03:00
|
|
|
{{#each this.revisionList as |revision index|}}
|
|
|
|
<li class="nav-list-item {{if revision.selected "selected" ""}}">
|
|
|
|
<button type="button" {{action "handleClick" index}}>
|
2023-04-18 16:28:21 +03:00
|
|
|
<div class="flex items-center">
|
2023-04-19 18:25:12 +03:00
|
|
|
<span class="gh-post-history-version">{{gh-format-post-time revision.createdAt format="D MMM YYYY, HH:mm"}}{{this.timezone}}</span>
|
2023-04-19 16:55:32 +03:00
|
|
|
{{#if revision.latest}}
|
|
|
|
<span class="gh-post-history-version-current">Latest</span>
|
|
|
|
{{/if}}
|
2023-04-20 13:43:22 +03:00
|
|
|
</div>
|
2023-04-18 18:10:41 +03:00
|
|
|
<span class="gh-post-history-version-meta">{{revision.author.name}}</span>
|
2023-04-18 14:10:51 +03:00
|
|
|
</button>
|
2023-04-19 18:34:53 +03:00
|
|
|
{{#if (and revision.selected (not revision.latest))}}
|
2023-04-20 13:43:22 +03:00
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="gh-post-history-version-restore"
|
|
|
|
{{on "click" (fn this.restoreRevision index)}}
|
|
|
|
>
|
2023-04-19 16:55:32 +03:00
|
|
|
<span>Restore</span>
|
|
|
|
</button>
|
|
|
|
{{/if}}
|
2023-04-18 14:10:51 +03:00
|
|
|
</li>
|
2023-04-18 18:10:41 +03:00
|
|
|
{{/each}}
|
2023-04-18 14:10:51 +03:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-17 17:25:52 +03:00
|
|
|
</div>
|