Ghost/ghost/admin/app/components/modal-post-history.hbs

95 lines
4.7 KiB
Handlebars
Raw Normal View History

{{!-- 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}}
{{#if this.showDifferences}}
2023-04-19 15:07:51 +03:00
{{{this.diffHtml}}}
{{/if}}
2023-04-19 15:07:51 +03:00
{{/if}}
{{#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>
<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>
<KoenigLexicalEditor @lexical={{this.selectedRevision.lexical}} @cardConfig={{this.cardConfig}} @registerAPI={{action "registerSelectedEditorApi"}}/>
2023-04-19 15:07:51 +03:00
</div>
</div>
</div>
<div class="settings-menu-container">
<div class="settings-menu settings-menu-pane settings-menu-pane-main">
<div class="settings-menu-header-wrapper">
<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>
</div>
{{#if (feature 'postDiffing')}}
<ul class="nav-list">
<li class="nav-list-item compare-versions">
<div class="for-switch x-small">
<label class="switch">
<span>Compare with 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>
</li>
</ul>
{{/if}}
</div>
<div class="settings-menu-content">
<ul class="nav-list">
{{#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">
<span class="gh-post-history-version">{{gh-format-post-time revision.createdAt format="D MMM YYYY, HH:mm"}}{{this.timezone}}</span>
{{#if revision.latest}}
<span class="gh-post-history-version-current">Latest</span>
{{/if}}
</div>
<span class="gh-post-history-version-meta">{{revision.author.name}}</span>
</button>
{{#if (and revision.selected (not revision.latest))}}
<button
type="button"
class="gh-post-history-version-restore"
{{on "click" (fn this.restoreRevision index)}}
>
<span>Restore</span>
</button>
{{/if}}
</li>
{{/each}}
</ul>
</div>
</div>
</div>
</div>