mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
show author always as text
This commit is contained in:
@@ -143,31 +143,31 @@ const ChangesetAuthor: FC<Props> = ({ changeset }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const authorLine = [];
|
const authorLine = [];
|
||||||
|
if (changeset.author) {
|
||||||
|
authorLine.push(
|
||||||
|
<Persons
|
||||||
|
persons={[changeset.author]}
|
||||||
|
label={"changesets.authors.authoredBy"}
|
||||||
|
displayTextOnly={true}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const commiters = getCommiters();
|
const commiters = getCommiters();
|
||||||
if (commiters.length > 0) {
|
if (commiters.length > 0) {
|
||||||
authorLine.push(<Persons persons={commiters} label={"changesets.authors.committedBy"} />);
|
authorLine.push(<Persons persons={commiters} label={"changesets.authors.committedBy"} />);
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
const coAuthors = getCoAuthors();
|
const coAuthors = getCoAuthors();
|
||||||
if (coAuthors.length > 0) {
|
if (coAuthors.length > 0) {
|
||||||
authorLine.push(<Persons persons={coAuthors} label={"changesets.authors.coAuthoredBy"} />);
|
authorLine.push(<Persons persons={coAuthors} label={"changesets.authors.coAuthoredBy"} />);
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
// extensions
|
// extensions
|
||||||
const extensions = binder.getExtensions("changesets.author.suffix", { changeset });
|
const extensions = binder.getExtensions("changesets.author.suffix", { changeset });
|
||||||
if (extensions) {
|
if (extensions) {
|
||||||
coAuthors.push(...extensions);
|
coAuthors.push(...extensions);
|
||||||
}
|
|
||||||
|
|
||||||
if (changeset.author) {
|
|
||||||
authorLine.unshift(
|
|
||||||
<Persons
|
|
||||||
persons={[changeset.author]}
|
|
||||||
label={"changesets.authors.authoredBy"}
|
|
||||||
displayTextOnly={authorLine.length === 0}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ storiesOf("Changesets", module)
|
|||||||
.add("With avatar", () => {
|
.add("With avatar", () => {
|
||||||
return withAvatarFactory(person => hitchhiker, three);
|
return withAvatarFactory(person => hitchhiker, three);
|
||||||
})
|
})
|
||||||
|
.add("Commiter and Co-Authors with avatar", () => {
|
||||||
|
return withAvatarFactory(robohash, one);
|
||||||
|
})
|
||||||
.add("Co-Authors with avatar", () => {
|
.add("Co-Authors with avatar", () => {
|
||||||
return withAvatarFactory(robohash, four);
|
return withAvatarFactory(robohash, four);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user