mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Added restore button to selected post version
No ref
This commit is contained in:
parent
9e268009da
commit
a0dbdfad6b
2 changed files with 25 additions and 51 deletions
|
@ -1,9 +1,5 @@
|
||||||
{{!-- template-lint-disable no-invalid-interactive --}}
|
{{!-- template-lint-disable no-invalid-interactive --}}
|
||||||
<div class="gh-post-history">
|
<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 →</a>
|
|
||||||
</div> --}}
|
|
||||||
<div class="gh-post-history-main">
|
<div class="gh-post-history-main">
|
||||||
<div class="gh-koenig-editor-pane flex flex-column mih-100">
|
<div class="gh-koenig-editor-pane flex flex-column mih-100">
|
||||||
<div class="gh-editor-feature-image-container">
|
<div class="gh-editor-feature-image-container">
|
||||||
|
@ -43,21 +39,33 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="settings-menu-content">
|
<div class="settings-menu-content">
|
||||||
<ul class="nav-list">
|
<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|}}
|
{{#each this.revisionList as |revision index|}}
|
||||||
<li class="nav-list-item {{if revision.selected "selected" ""}}">
|
<li class="nav-list-item {{if revision.selected "selected" ""}}">
|
||||||
<button type="button" {{action "handleClick" index}}>
|
<button type="button" {{action "handleClick" index}}>
|
||||||
<div class="flex items-center">
|
<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">{{capitalize-first-letter (moment-from-now revision.createdAt)}}</span>
|
||||||
{{!-- <span class="gh-post-history-version-wordcount">
|
{{#if revision.latest}}
|
||||||
<span class="added">+275</span>
|
<span class="gh-post-history-version-current">Latest</span>
|
||||||
<span class="subtracted">-73</span>
|
{{/if}}
|
||||||
</span> --}}
|
</div>
|
||||||
{{!-- <button class="gh-btn gh-btn-text gh-post-history-version-restore">
|
|
||||||
<span>Restore</span>
|
|
||||||
</button> --}}
|
|
||||||
</div>
|
|
||||||
<span class="gh-post-history-version-meta">{{revision.author.name}}</span>
|
<span class="gh-post-history-version-meta">{{revision.author.name}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
{{#if revision.selected}}
|
||||||
|
<button type="button" class="gh-post-history-version-restore">
|
||||||
|
<span>Restore</span>
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -37,28 +37,20 @@
|
||||||
border-radius: var(--border-radius);
|
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 {
|
.nav-list-item .gh-post-history-version-restore {
|
||||||
margin-left: auto;
|
position: absolute;
|
||||||
|
top: 20px;
|
||||||
|
right: 24px;
|
||||||
|
width: inherit;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-list-item .gh-post-history-version-restore span {
|
.nav-list-item .gh-post-history-version-restore span {
|
||||||
color: var(--red);
|
color: var(--red);
|
||||||
font-size: 1.35rem;
|
font-size: 1.35rem;
|
||||||
font-weight: 400;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Main content */
|
/* Main content */
|
||||||
|
|
||||||
.gh-post-history-main {
|
.gh-post-history-main {
|
||||||
|
@ -68,32 +60,6 @@
|
||||||
overflow: auto;
|
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 {
|
.gh-post-history .gh-editor-title {
|
||||||
height: initial;
|
height: initial;
|
||||||
max-width: 740px;
|
max-width: 740px;
|
||||||
|
|
Loading…
Add table
Reference in a new issue