fix(ui): [fixes #217] Give volume slider full width of peer list (#218)

* fix(ui): give volume slider full width of peer list
* refactor(PeerListItem): improve variable name
This commit is contained in:
Jeremy Kahn 2023-12-09 20:04:44 -06:00 committed by GitHub
parent 6cbfaacf1a
commit 15142f9328
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ export const PeerListItem = ({
const isPeerConnectionDirect =
peerConnectionTypes[peer.peerId] === PeerConnectionType.DIRECT
const handleListItemClick = () => {
const handleListItemTextClick = () => {
setShowPeerDialog(true)
}
@ -71,17 +71,12 @@ export const PeerListItem = ({
return (
<>
<ListItem
key={peer.peerId}
divider={true}
onClick={handleListItemClick}
sx={{ cursor: 'pointer' }}
>
<ListItem key={peer.peerId} divider={true}>
<PeerDownloadFileButton peer={peer} />
<ListItemText
primaryTypographyProps={{
sx: { display: 'flex', alignContent: 'center' },
}}
<ListItemText>
<Box
sx={{ display: 'flex', alignContent: 'center', cursor: 'pointer' }}
onClick={handleListItemTextClick}
>
{hasPeerConnection ? (
<Tooltip
@ -128,6 +123,7 @@ export const PeerListItem = ({
{verificationStateDisplayMap[peer.verificationState]}
</Box>
<PeerNameDisplay>{peer.userId}</PeerNameDisplay>
</Box>
{peer.peerId in peerAudios && (
<AudioVolume audioEl={peerAudios[peer.peerId]} />
)}