client: update editor user name

This commit is contained in:
fantasticit 2022-06-03 18:21:24 +08:00
parent 57959a904f
commit c20c9794f9
2 changed files with 2 additions and 2 deletions

View File

@ -197,7 +197,7 @@ export const DocumentCollaboration: React.FC<IProps> = ({ wikiId, documentId, di
<AvatarGroup maxCount={5} size="extra-small">
{collaborationUsers.map((user) => {
return (
<Tooltip key={user.id} content={`${user.name}`} position="bottom">
<Tooltip key={user.id} content={`${user.name}-${user.clientId}`} position="bottom">
<Avatar src={user.avatar} size="extra-small">
{user.name && user.name.charAt(0)}
</Avatar>

View File

@ -64,7 +64,7 @@ export const EditorInstance = forwardRef((props: IProps, ref) => {
provider: hocuspocusProvider,
user: {
...(user || {
name: '匿名用户正在阅读文章...',
name: '访客',
}),
color: getRandomColor(),
},