mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added author image to revision history list (#16724)
refs https://github.com/TryGhost/Team/issues/3129 This has copied the same pattern from the gh-user-list-item component. Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
This commit is contained in:
parent
ad3c5d1a0b
commit
d87da627d9
3 changed files with 22 additions and 3 deletions
|
@ -71,7 +71,12 @@
|
|||
{{/if}}
|
||||
|
||||
</div>
|
||||
<span class="gh-post-history-version-meta {{if (eq revision.author.name "Deleted staff user") "deleted-user"}}">{{revision.author.name}}</span>
|
||||
<div class="flex items-center mt2">
|
||||
<span class="user-list-item-figure" style={{background-image-style revision.author.profile_image_url}}>
|
||||
<span class="hidden">Photo of {{revisions.author.name}}</span>
|
||||
</span>
|
||||
<span class="gh-post-history-version-meta {{if (eq revision.author.name "Deleted staff user") "deleted-user"}}">{{revision.author.name}}</span>
|
||||
</div>
|
||||
</button>
|
||||
{{#if (and revision.selected (not revision.latest))}}
|
||||
<button
|
||||
|
|
|
@ -24,6 +24,7 @@ export default class ModalPostHistory extends Component {
|
|||
@service notifications;
|
||||
@service modals;
|
||||
@service feature;
|
||||
@service ghostPaths;
|
||||
@tracked selectedHTML = null;
|
||||
@tracked diffHtml = null;
|
||||
@tracked showDifferences = this.feature.get('postDiffing'); // should default to true in future
|
||||
|
@ -65,7 +66,8 @@ export default class ModalPostHistory extends Component {
|
|||
feature_image_alt: revision.get('featureImageAlt'),
|
||||
feature_image_caption: revision.get('featureImageCaption'),
|
||||
author: {
|
||||
name: revision.get('author.name') || 'Deleted staff user'
|
||||
name: revision.get('author.name') || 'Deleted staff user',
|
||||
profile_image_url: revision.get('author.profileImage') || this.ghostPaths.assetRoot.replace(/\/$/, '') + '/img/user-image.png'
|
||||
},
|
||||
postStatus: revision.get('postStatus'),
|
||||
reason: revision.get('reason'),
|
||||
|
|
|
@ -29,6 +29,13 @@
|
|||
background: var(--whitegrey-l2);
|
||||
}
|
||||
|
||||
.gh-post-history .user-list-item-figure {
|
||||
width: 2.8rem;
|
||||
height: 2.8rem;
|
||||
margin: 0 8px 0 0;
|
||||
border: 1px solid var(--whitegrey-d1);
|
||||
}
|
||||
|
||||
.nav-list-item .gh-post-history-version-meta {
|
||||
margin-top: 4px;
|
||||
color: var(--midgrey);
|
||||
|
@ -77,7 +84,12 @@
|
|||
.nav-list-item .gh-post-history-version-restore span {
|
||||
color: var(--midgrey);
|
||||
font-size: 1.35rem;
|
||||
font-weight: 500;
|
||||
font-weight: 600;
|
||||
transition: all .2s ease;
|
||||
}
|
||||
|
||||
.nav-list-item .gh-post-history-version-restore:hover span {
|
||||
color: var(--midgrey-d2);
|
||||
}
|
||||
|
||||
.gh-post-history-footer {
|
||||
|
|
Loading…
Reference in a new issue