eslint fixes;styling

master
Stefan Otto 2019-10-23 13:29:55 +02:00
parent 79ecaf7408
commit abca024c84
2 changed files with 30 additions and 22 deletions

View File

@ -69,6 +69,10 @@ const styles = (theme) =>
{ {
backgroundColor : 'var(--media-control-botton-on)' backgroundColor : 'var(--media-control-botton-on)'
} }
},
ListItem :
{
alignItems: 'center'
} }
}); });
@ -84,13 +88,14 @@ const ListLobbyPeer = (props) =>
return ( return (
<ListItem <ListItem
className={classnames(classes.ListItem)}
key={peer.peerId} key={peer.peerId}
button button
alignItems="flex-start" alignItems='flex-start'
> >
<ListItemAvatar> <ListItemAvatar>
<Avatar alt='Peer avatar' src={picture} /> <Avatar alt='Peer avatar' src={picture} />
</ListItemAvatar> </ListItemAvatar>
<ListItemText <ListItemText
primary={peer.displayName} primary={peer.displayName}
/> />
@ -99,10 +104,10 @@ const ListLobbyPeer = (props) =>
disabled : peer.promotionInProgress disabled : peer.promotionInProgress
})} })}
onClick={(e) => onClick={(e) =>
{ {
e.stopPropagation(); e.stopPropagation();
roomClient.promoteLobbyPeer(peer.id); roomClient.promoteLobbyPeer(peer.id);
}} }}
> >
<PromoteIcon /> <PromoteIcon />
</ListItemIcon> </ListItemIcon>

View File

@ -16,15 +16,14 @@ import FormLabel from '@material-ui/core/FormLabel';
import FormControl from '@material-ui/core/FormControl'; import FormControl from '@material-ui/core/FormControl';
import FormGroup from '@material-ui/core/FormGroup'; import FormGroup from '@material-ui/core/FormGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel'; import FormControlLabel from '@material-ui/core/FormControlLabel';
import Checkbox from '@material-ui/core/Checkbox'; // import Checkbox from '@material-ui/core/Checkbox';
import InputLabel from '@material-ui/core/InputLabel'; // import InputLabel from '@material-ui/core/InputLabel';
import OutlinedInput from '@material-ui/core/OutlinedInput'; // import OutlinedInput from '@material-ui/core/OutlinedInput';
import Switch from '@material-ui/core/Switch'; import Switch from '@material-ui/core/Switch';
import List from '@material-ui/core/List'; import List from '@material-ui/core/List';
import ListSubheader from '@material-ui/core/ListSubheader'; import ListSubheader from '@material-ui/core/ListSubheader';
import ListLobbyPeer from './ListLobbyPeer'; import ListLobbyPeer from './ListLobbyPeer';
const styles = (theme) => const styles = (theme) =>
({ ({
root : root :
@ -52,7 +51,7 @@ const styles = (theme) =>
}, },
lock : lock :
{ {
padding : theme.spacing.unit * 2 padding : theme.spacing(2)
} }
}); });
@ -60,7 +59,7 @@ const LockDialog = ({
roomClient, roomClient,
room, room,
handleCloseLockDialog, handleCloseLockDialog,
handleAccessCode, // handleAccessCode,
lobbyPeers, lobbyPeers,
classes classes
}) => }) =>
@ -123,21 +122,25 @@ const LockDialog = ({
</FormGroup> </FormGroup>
</FormControl> </FormControl>
{ lobbyPeers.length > 0 ? { (lobbyPeers.length > 0) &&
<List subheader={ <List
<ListSubheader component="div"> dense={true}
Participants in Lobby subheader={
</ListSubheader> <ListSubheader component='div'>
}> Participants in Lobby
{ </ListSubheader>
lobbyPeers.map((peerId) => { return (<ListLobbyPeer id={peerId} />); })
} }
>
{
lobbyPeers.map((peerId) =>
{
return (<ListLobbyPeer key={peerId} id={peerId} />);
})
}
</List> </List>
: null
} }
</form> </form>
<DialogActions> <DialogActions>
<Button onClick={() => handleCloseLockDialog({ lockDialogOpen: false })} color='primary'> <Button onClick={() => handleCloseLockDialog({ lockDialogOpen: false })} color='primary'>
Close Close
</Button> </Button>