show author always as text

This commit is contained in:
Sebastian Sdorra
2020-06-09 14:47:47 +02:00
parent 9174b89e8f
commit 4890d5528f
2 changed files with 14 additions and 11 deletions

View File

@@ -143,31 +143,31 @@ const ChangesetAuthor: FC<Props> = ({ changeset }) => {
};
const authorLine = [];
if (changeset.author) {
authorLine.push(
<Persons
persons={[changeset.author]}
label={"changesets.authors.authoredBy"}
displayTextOnly={true}
/>
);
}
const commiters = getCommiters();
if (commiters.length > 0) {
authorLine.push(<Persons persons={commiters} label={"changesets.authors.committedBy"} />);
}
}
const coAuthors = getCoAuthors();
if (coAuthors.length > 0) {
authorLine.push(<Persons persons={coAuthors} label={"changesets.authors.coAuthoredBy"} />);
}
}
// extensions
const extensions = binder.getExtensions("changesets.author.suffix", { changeset });
if (extensions) {
coAuthors.push(...extensions);
}
if (changeset.author) {
authorLine.unshift(
<Persons
persons={[changeset.author]}
label={"changesets.authors.authoredBy"}
displayTextOnly={authorLine.length === 0}
/>
);
}
return (

View File

@@ -71,6 +71,9 @@ storiesOf("Changesets", module)
.add("With avatar", () => {
return withAvatarFactory(person => hitchhiker, three);
})
.add("Commiter and Co-Authors with avatar", () => {
return withAvatarFactory(robohash, one);
})
.add("Co-Authors with avatar", () => {
return withAvatarFactory(robohash, four);
});