0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added restore button to selected post version

No ref
This commit is contained in:
Sanne de Vries 2023-04-19 14:55:32 +01:00
parent 9e268009da
commit a0dbdfad6b
2 changed files with 25 additions and 51 deletions

View file

@ -1,9 +1,5 @@
{{!-- template-lint-disable no-invalid-interactive --}}
<div class="gh-post-history">
{{!-- <div class="read-only-banner">
<span>You are viewing a revision from <strong>17 April 2023, 10:34</strong>.</span>
<a href="#">Roll back to this version &rarr;</a>
</div> --}}
<div class="gh-post-history-main">
<div class="gh-koenig-editor-pane flex flex-column mih-100">
<div class="gh-editor-feature-image-container">
@ -43,21 +39,33 @@
</div>
<div class="settings-menu-content">
<ul class="nav-list">
{{!-- <li class="nav-list-item">
<div class="for-switch x-small">
<label class="switch">
<span>Show changes to previous version</span>
<span class="gh-toggle-featured">
<input type="checkbox">
<span class="input-toggle-component"></span>
</span>
</label>
</div>
</li> --}}
{{#each this.revisionList as |revision index|}}
<li class="nav-list-item {{if revision.selected "selected" ""}}">
<button type="button" {{action "handleClick" index}}>
<div class="flex items-center">
<span class="gh-post-history-version">{{capitalize-first-letter (moment-from-now revision.createdAt)}}</span>
{{!-- <span class="gh-post-history-version-wordcount">
<span class="added">+275</span>
<span class="subtracted">-73</span>
</span> --}}
{{!-- <button class="gh-btn gh-btn-text gh-post-history-version-restore">
<span>Restore</span>
</button> --}}
</div>
{{#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 revision.selected}}
<button type="button" class="gh-post-history-version-restore">
<span>Restore</span>
</button>
{{/if}}
</li>
{{/each}}
</ul>

View file

@ -37,28 +37,20 @@
border-radius: var(--border-radius);
}
/* .nav-list-item .gh-post-history-version-wordcount {
color: var(--green-d1);
margin-left: auto;
}
.nav-list-item .gh-post-history-version-wordcount .subtracted {
color: var(--red-d1);
margin-left: .8rem;
} */
.nav-list-item .gh-post-history-version-restore {
margin-left: auto;
position: absolute;
top: 20px;
right: 24px;
width: inherit;
padding: 0;
}
.nav-list-item .gh-post-history-version-restore span {
color: var(--red);
font-size: 1.35rem;
font-weight: 400;
font-weight: 500;
}
/* Main content */
.gh-post-history-main {
@ -68,32 +60,6 @@
overflow: auto;
}
/* .gh-post-history .read-only-banner {
position: absolute;
top: 20px;
left: 0;
right: 420px;
z-index: 999;
display: flex;
justify-content: space-between;
width: 100%;
max-width: 788px;
margin: 0 auto;
padding: 16px 24px;
background: var(--white);
border: 1px solid var(--whitegrey-d1);
color: var(--black);
font-weight: 500;
border-radius: var(--border-radius);
box-shadow: var(--box-shadow-m);
}
.gh-post-history .read-only-banner a {
margin-left: auto;
color: var(--black);
text-decoration: underline;
} */
.gh-post-history .gh-editor-title {
height: initial;
max-width: 740px;