Added post revision anonymous author label (#16697)

refs https://github.com/TryGhost/Team/issues/3104

When a post revision author has been deleted, or there is no author
associated with a post revision, the label "Anonymous" is used for the
revision author
This commit is contained in:
Michael Barrett 2023-04-21 13:52:08 +01:00 committed by GitHub
parent a46d837fbd
commit 1538b18d4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -53,7 +53,7 @@
<span class="gh-post-history-version-tag published">Publised</span>
{{/if}}
</div>
<span class="gh-post-history-version-meta">{{revision.author.name}}</span>
<span class="gh-post-history-version-meta {{if (eq revision.author.name "Anonymous") "anonymous-author"}}">{{revision.author.name}}</span>
</button>
{{#if (and revision.selected (not revision.latest))}}
<button

View File

@ -61,7 +61,7 @@ export default class ModalPostHistory extends Component {
title: revision.get('title'),
feature_image: revision.get('featureImage'),
author: {
name: revision.get('author.name')
name: revision.get('author.name') || 'Anonymous'
}
};
});

View File

@ -36,6 +36,10 @@
font-weight: 400;
}
.nav-list-item .gh-post-history-version-meta.anonymous-author {
color: var(--lightgrey);
}
.nav-list-item .gh-post-history-version-tag {
margin-left: .8rem;
padding: 0 5px;