forked from Shiloh/remnantchat
* fix(ui): give volume slider full width of peer list * refactor(PeerListItem): improve variable name
This commit is contained in:
parent
6cbfaacf1a
commit
15142f9328
@ -61,7 +61,7 @@ export const PeerListItem = ({
|
|||||||
const isPeerConnectionDirect =
|
const isPeerConnectionDirect =
|
||||||
peerConnectionTypes[peer.peerId] === PeerConnectionType.DIRECT
|
peerConnectionTypes[peer.peerId] === PeerConnectionType.DIRECT
|
||||||
|
|
||||||
const handleListItemClick = () => {
|
const handleListItemTextClick = () => {
|
||||||
setShowPeerDialog(true)
|
setShowPeerDialog(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,17 +71,12 @@ export const PeerListItem = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ListItem
|
<ListItem key={peer.peerId} divider={true}>
|
||||||
key={peer.peerId}
|
|
||||||
divider={true}
|
|
||||||
onClick={handleListItemClick}
|
|
||||||
sx={{ cursor: 'pointer' }}
|
|
||||||
>
|
|
||||||
<PeerDownloadFileButton peer={peer} />
|
<PeerDownloadFileButton peer={peer} />
|
||||||
<ListItemText
|
<ListItemText>
|
||||||
primaryTypographyProps={{
|
<Box
|
||||||
sx: { display: 'flex', alignContent: 'center' },
|
sx={{ display: 'flex', alignContent: 'center', cursor: 'pointer' }}
|
||||||
}}
|
onClick={handleListItemTextClick}
|
||||||
>
|
>
|
||||||
{hasPeerConnection ? (
|
{hasPeerConnection ? (
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@ -128,6 +123,7 @@ export const PeerListItem = ({
|
|||||||
{verificationStateDisplayMap[peer.verificationState]}
|
{verificationStateDisplayMap[peer.verificationState]}
|
||||||
</Box>
|
</Box>
|
||||||
<PeerNameDisplay>{peer.userId}</PeerNameDisplay>
|
<PeerNameDisplay>{peer.userId}</PeerNameDisplay>
|
||||||
|
</Box>
|
||||||
{peer.peerId in peerAudios && (
|
{peer.peerId in peerAudios && (
|
||||||
<AudioVolume audioEl={peerAudios[peer.peerId]} />
|
<AudioVolume audioEl={peerAudios[peer.peerId]} />
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user