2023-04-17 17:25:52 +03:00
|
|
|
{{!-- template-lint-disable no-invalid-interactive --}}
|
2023-04-21 11:45:28 +03:00
|
|
|
<div class="gh-post-history" {{did-insert this.onInsert}}>
|
2023-04-17 18:40:32 +03:00
|
|
|
<div class="gh-post-history-main">
|
2023-06-01 15:22:51 +03:00
|
|
|
<div class="gh-koenig-editor-pane flex flex-column mih-100">
|
|
|
|
{{#if this.selectedHTML}}
|
2023-04-21 16:13:59 +03:00
|
|
|
{{{this.selectedHTML}}}
|
|
|
|
{{/if}}
|
2023-04-19 15:07:51 +03:00
|
|
|
<div class="gh-post-history-hidden-lexical current">
|
2023-04-21 16:13:59 +03:00
|
|
|
<div class="gh-editor-feature-image-container">
|
|
|
|
<div class="gh-editor-feature-image">
|
2023-04-21 18:57:49 +03:00
|
|
|
{{#if this.selectedRevision.feature_image}}
|
|
|
|
<img src="{{this.selectedRevision.feature_image}}">
|
|
|
|
{{/if}}
|
|
|
|
{{#if this.selectedRevision.feature_image_caption}}
|
2023-04-21 19:01:51 +03:00
|
|
|
<p>{{{this.selectedRevision.feature_image_caption}}}</p>
|
2023-04-21 18:57:49 +03:00
|
|
|
{{/if}}
|
2023-04-21 16:13:59 +03:00
|
|
|
</div>
|
2023-04-21 15:20:01 +03:00
|
|
|
</div>
|
2023-04-19 15:07:51 +03:00
|
|
|
<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}}
|
2023-04-21 11:25:24 +03:00
|
|
|
<span class="gh-post-history-version-tag current">Latest</span>
|
2023-05-01 11:30:02 +03:00
|
|
|
{{/if}}
|
|
|
|
|
2023-05-02 12:30:18 +03:00
|
|
|
{{#if revision.new_publish}}
|
2023-05-01 11:30:02 +03:00
|
|
|
<span class="gh-post-history-version-tag published">Published</span>
|
2023-04-21 11:25:24 +03:00
|
|
|
{{/if}}
|
2023-05-03 10:20:34 +03:00
|
|
|
{{#if (eq revision.reason "unpublished")}}
|
2023-05-02 12:30:18 +03:00
|
|
|
<span class="gh-post-history-version-tag unpublished">Unpublished</span>
|
|
|
|
{{/if}}
|
2023-06-01 15:22:51 +03:00
|
|
|
|
2023-04-20 13:43:22 +03:00
|
|
|
</div>
|
2023-05-03 02:38:31 +03:00
|
|
|
<div class="flex items-center mt2">
|
|
|
|
<span class="user-list-item-figure" style={{background-image-style revision.author.profile_image_url}}>
|
2023-05-03 02:50:34 +03:00
|
|
|
<span class="hidden">Photo of {{revision.author.name}}</span>
|
2023-05-03 02:38:31 +03:00
|
|
|
</span>
|
|
|
|
<span class="gh-post-history-version-meta {{if (eq revision.author.name "Deleted staff user") "deleted-user"}}">{{revision.author.name}}</span>
|
|
|
|
</div>
|
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>
|
2023-04-21 11:45:28 +03:00
|
|
|
{{this.didInsert}}
|