enhancement(revisions): show guest users

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2023-03-29 20:26:11 +02:00
parent d45ab1eb29
commit 57aa5a971c
No known key found for this signature in database
GPG key ID: DB99ADDDC5C0AF82

View file

@ -51,7 +51,7 @@ export const RevisionListEntry: React.FC<RevisionListEntryProps> = ({ active, on
showErrorNotification('editor.modal.revision.errorUser')(error as Error)
return null
}
}, [])
}, [showErrorNotification, revision])
return (
<ListGroup.Item
@ -73,6 +73,12 @@ export const RevisionListEntry: React.FC<RevisionListEntryProps> = ({ active, on
<WaitSpinner />
</ShowIf>
<ShowIf condition={!revisionAuthors.error && !revisionAuthors.loading}>{revisionAuthors.value}</ShowIf>
<ShowIf condition={revision.authorUsernames.length > 0 && revision.anonymousAuthorCount > 0}>
<span className={'mx-1'}>+</span>
</ShowIf>
<ShowIf condition={revision.anonymousAuthorCount > 0}>
<Trans i18nKey={'editor.modal.revision.guests'} values={{ count: revision.anonymousAuthorCount }} />
</ShowIf>
</span>
</ListGroup.Item>
)