Sfoglia il codice sorgente

fix(participants): Knocking participant name in participants list

Fixes https://github.com/jitsi/jitsi-meet/issues/9211
j8
Vlad Piersec 4 anni fa
parent
commit
3f7073c589

+ 1
- 0
react/features/participants-pane/components/LobbyParticipantItem.js Vedi File

28
         <ParticipantItem
28
         <ParticipantItem
29
             actionsTrigger = { ActionTrigger.Permanent }
29
             actionsTrigger = { ActionTrigger.Permanent }
30
             audioMuteState = { MediaState.None }
30
             audioMuteState = { MediaState.None }
31
+            name = { p.name }
31
             participant = { p }
32
             participant = { p }
32
             videoMuteState = { MediaState.None }>
33
             videoMuteState = { MediaState.None }>
33
             <ParticipantActionButton
34
             <ParticipantActionButton

+ 8
- 2
react/features/participants-pane/components/ParticipantItem.js Vedi File

100
      */
100
      */
101
     isHighlighted?: boolean,
101
     isHighlighted?: boolean,
102
 
102
 
103
+    /**
104
+     * The name of the participant. Used for showing lobby names.
105
+     */
106
+    name?: string,
107
+
103
     /**
108
     /**
104
      * Callback for when the mouse leaves this component
109
      * Callback for when the mouse leaves this component
105
      */
110
      */
123
     actionsTrigger = ActionTrigger.Hover,
128
     actionsTrigger = ActionTrigger.Hover,
124
     audioMuteState = MediaState.None,
129
     audioMuteState = MediaState.None,
125
     videoMuteState = MediaState.None,
130
     videoMuteState = MediaState.None,
131
+    name,
126
     participant: p
132
     participant: p
127
 }: Props) => {
133
 }: Props) => {
128
     const ParticipantActions = Actions[actionsTrigger];
134
     const ParticipantActions = Actions[actionsTrigger];
129
     const { t } = useTranslation();
135
     const { t } = useTranslation();
130
-    const name = useSelector(getParticipantDisplayNameWithId(p.id));
136
+    const displayName = name || useSelector(getParticipantDisplayNameWithId(p.id));
131
 
137
 
132
     return (
138
     return (
133
         <ParticipantContainer
139
         <ParticipantContainer
141
             <ParticipantContent>
147
             <ParticipantContent>
142
                 <ParticipantNameContainer>
148
                 <ParticipantNameContainer>
143
                     <ParticipantName>
149
                     <ParticipantName>
144
-                        { name }
150
+                        { displayName }
145
                     </ParticipantName>
151
                     </ParticipantName>
146
                     { p.local ? <span>&nbsp;({t('chat.you')})</span> : null }
152
                     { p.local ? <span>&nbsp;({t('chat.you')})</span> : null }
147
                 </ParticipantNameContainer>
153
                 </ParticipantNameContainer>

Loading…
Annulla
Salva