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-20 19:47:24 +03:00
|
|
|
<div class="gh-koenig-editor-pane flex flex-column mih-100 {{if this.showDifferences "show-diff" ""}}">
|
|
|
|
<div class="gh-editor-feature-image-container"></div>
|
2023-04-21 10:43:28 +03:00
|
|
|
{{#if (and this.diffHtml this.showDifferences (feature 'postDiffing'))}}
|
|
|
|
{{{this.diffHtml}}}
|
|
|
|
{{else if this.selectedHTML}}
|
|
|
|
{{{this.selectedHTML}}}
|
2023-04-19 19:38:16 +03:00
|
|
|
{{/if}}
|
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-20 19:47:24 +03:00
|
|
|
<div class="settings-menu-header subview">
|
|
|
|
<button
|
|
|
|
aria-label="Close meta data panel"
|
|
|
|
class="back settings-menu-header-action"
|
|
|
|
data-test-button="close-psm-subview"
|
|
|
|
type="button" {{action "closeModal"}}
|
|
|
|
{{on "mousedown" (optional this.noop)}}
|
|
|
|
>
|
|
|
|
{{svg-jar "arrow-left"}}
|
|
|
|
<span class="hidden">Back</span>
|
|
|
|
</button>
|
|
|
|
<h4>Post history</h4>
|
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>
|
2023-04-20 19:47:24 +03:00
|
|
|
{{#if (feature 'postDiffing')}}
|
|
|
|
<div class="gh-post-history-footer">
|
|
|
|
<div class="gh-post-history-footer-inner">
|
|
|
|
<div class="for-switch x-small">
|
|
|
|
<label class="switch">
|
|
|
|
<span>Compare to previous version</span>
|
|
|
|
<span class="gh-toggle-featured">
|
|
|
|
<input {{on "click" (fn this.toggleDifferences '')}} type="checkbox" checked={{this.showDifferences}}>
|
|
|
|
<span class="input-toggle-component"></span>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2023-04-18 14:10:51 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-04-17 17:25:52 +03:00
|
|
|
</div>
|