feat(revision): only show non-guest users in the revision sidebar

Signed-off-by: SHAN michel <yuplasmas@gmail.com>

Only show non-guest users in the sidebar #2953 + frontend/json modificated

Signed-off-by: SHAN michel <yuplasmas@gmail.com>

Only show non-guest users in the sidebar #2953 + frontend/json modificated

Signed-off-by: SHAN michel <yuplasmas@gmail.com>
This commit is contained in:
SHAN michel 2023-04-16 13:59:41 +02:00 committed by Philip Molares
parent 62e29613cc
commit 63f7d94b7c
2 changed files with 7 additions and 1 deletions

View file

@ -411,7 +411,8 @@
"error": "An error occurred while fetching the revisions of this note.", "error": "An error occurred while fetching the revisions of this note.",
"errorUser": "An error occurred while fetching the user information for this revision.", "errorUser": "An error occurred while fetching the user information for this revision.",
"length": "Length", "length": "Length",
"download": "Download selected revision" "download": "Download selected revision",
"guestCount": "Anonymous authors or guests"
}, },
"clipboardImport": { "clipboardImport": {
"title": "Import from clipboard", "title": "Import from clipboard",

View file

@ -17,6 +17,7 @@ import { ListGroup } from 'react-bootstrap'
import { Clock as IconClock } from 'react-bootstrap-icons' import { Clock as IconClock } from 'react-bootstrap-icons'
import { FileText as IconFileText } from 'react-bootstrap-icons' import { FileText as IconFileText } from 'react-bootstrap-icons'
import { Person as IconPerson } from 'react-bootstrap-icons' import { Person as IconPerson } from 'react-bootstrap-icons'
import { PersonPlus as IconPersonPlus } from 'react-bootstrap-icons'
import { Trans, useTranslation } from 'react-i18next' import { Trans, useTranslation } from 'react-i18next'
import { useAsync } from 'react-use' import { useAsync } from 'react-use'
@ -74,6 +75,10 @@ export const RevisionListEntry: React.FC<RevisionListEntryProps> = ({ active, on
</ShowIf> </ShowIf>
<ShowIf condition={!revisionAuthors.error && !revisionAuthors.loading}>{revisionAuthors.value}</ShowIf> <ShowIf condition={!revisionAuthors.error && !revisionAuthors.loading}>{revisionAuthors.value}</ShowIf>
</span> </span>
<span>
<UiIcon icon={IconPersonPlus} className='mx-2' />
<Trans i18nKey={'editor.modal.revision.guestCount'} />: {revision.anonymousAuthorCount}
</span>
</ListGroup.Item> </ListGroup.Item>
) )
} }