Lint clean up

This commit is contained in:
Håvar Aambø Fosstveit
2019-03-31 22:22:25 +02:00
parent 2f19746fa9
commit 77298b6f2e
19 changed files with 139 additions and 145 deletions
+5 -2
View File
@@ -30,7 +30,7 @@ const styles = () =>
fontSize : '1.7vmin',
fontWeight : 'bolder',
animation : 'none',
'&.pulse' :
'&.pulse' :
{
animation : 'pulse 0.5s'
}
@@ -91,7 +91,10 @@ class HiddenPeers extends React.PureComponent
} = this.props;
return (
<div className={classnames(classes.root, this.state.className)} onClick={() => openUsersTab()}>
<div
className={classnames(classes.root, this.state.className)}
onClick={() => openUsersTab()}
>
<p>+{hiddenPeersCount} <br /> participant
{(hiddenPeersCount === 1) ? null : 's'}
</p>
+11 -11
View File
@@ -34,20 +34,20 @@ const styles = () =>
},
'&.screen' :
{
order : 1
order : 1
}
},
controls :
{
position : 'absolute',
right : 0,
top : 0,
display : 'flex',
flexDirection : 'row',
padding : '0.4vmin',
zIndex : 20,
opacity : 0,
transition : 'opacity 0.3s',
position : 'absolute',
right : 0,
top : 0,
display : 'flex',
flexDirection : 'row',
padding : '0.4vmin',
zIndex : 20,
opacity : 0,
transition : 'opacity 0.3s',
'&.visible' :
{
opacity : 1
@@ -62,7 +62,7 @@ const styles = () =>
width : 'var(--media-control-button-size)',
height : 'var(--media-control-button-size)',
backgroundColor : 'var(--media-control-button-color)',
'&:hover' :
'&:hover' :
{
opacity : 1
},
+2 -2
View File
@@ -51,7 +51,7 @@ const styles = () =>
zIndex : 20,
opacity : 0,
transition : 'opacity 0.3s',
'&.visible' :
'&.visible' :
{
opacity : 1
}
@@ -68,7 +68,7 @@ const styles = () =>
cursor : 'pointer',
transitionProperty : 'opacity, background-color',
transitionDuration : '0.15s',
'&:hover' :
'&:hover' :
{
opacity : 1
},
@@ -41,14 +41,14 @@ class ChatInput extends React.PureComponent
}
createNewMessage = (text, sender, name, picture) =>
({
type : 'message',
text,
time : Date.now(),
name,
sender,
picture
});
({
type : 'message',
text,
time : Date.now(),
name,
sender,
picture
});
handleChange = (e) =>
{
@@ -121,10 +121,10 @@ ChatInput.propTypes =
};
const mapStateToProps = (state) =>
({
displayName : state.me.displayName,
picture : state.me.picture
});
({
displayName : state.me.displayName,
picture : state.me.picture
});
export default withRoomContext(
connect(mapStateToProps)(withStyles(styles)(ChatInput))
@@ -26,7 +26,7 @@ const styles = (theme) =>
},
selfMessage :
{
marginLeft : 'auto',
marginLeft : 'auto'
},
remoteMessage :
{
@@ -48,7 +48,7 @@ const styles = (theme) =>
borderRadius : '50%',
height : '2rem',
alignSelf : 'center'
},
}
});
const Message = (props) =>
@@ -88,12 +88,12 @@ const Message = (props) =>
Message.propTypes =
{
self : PropTypes.bool,
picture : PropTypes.string,
text : PropTypes.string,
time : PropTypes.string,
name : PropTypes.string,
classes : PropTypes.object.isRequired
self : PropTypes.bool,
picture : PropTypes.string,
text : PropTypes.string,
time : PropTypes.string,
name : PropTypes.string,
classes : PropTypes.object.isRequired
};
export default withStyles(styles)(Message);
@@ -35,6 +35,7 @@ class MessageList extends React.PureComponent
{
if (nextProps.chatmessages.length !== this.props.chatmessages.length)
return true;
return false;
}
@@ -55,6 +56,7 @@ class MessageList extends React.PureComponent
{
const {
chatmessages,
myPicture,
classes
} = this.props;
@@ -66,7 +68,7 @@ class MessageList extends React.PureComponent
const messageTime = new Date(message.time);
const picture = (message.sender === 'response' ?
message.picture : this.props.myPicture) || EmptyAvatar;
message.picture : myPicture) || EmptyAvatar;
return (
<Message
@@ -88,12 +90,14 @@ class MessageList extends React.PureComponent
MessageList.propTypes =
{
chatmessages : PropTypes.array,
myPicture : PropTypes.string,
classes : PropTypes.object.isRequired
};
const mapStateToProps = (state) =>
({
chatmessages : state.chatmessages
});
({
chatmessages : state.chatmessages,
myPicture : state.me.picture
});
export default connect(mapStateToProps, null)(withStyles(styles)(MessageList));
@@ -12,11 +12,11 @@ const styles = (theme) =>
({
root :
{
display : 'flex',
alignItems : 'center',
width : '100%',
padding : theme.spacing.unit,
boxShadow : '0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',
display : 'flex',
alignItems : 'center',
width : '100%',
padding : theme.spacing.unit,
boxShadow : '0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',
'&:not(:last-child)' :
{
marginBottom : theme.spacing.unit
@@ -57,16 +57,14 @@ class MeetingDrawer extends React.PureComponent
variant='fullWidth'
>
<Tab
label=
{
label={
<Badge color='secondary' badgeContent={unreadMessages}>
Chat
</Badge>
}
/>
<Tab
label=
{
label={
<Badge color='secondary' badgeContent={unreadFiles}>
File sharing
</Badge>
@@ -99,7 +97,7 @@ const mapStateToProps = (state) => ({
});
const mapDispatchToProps = {
setToolTab : stateActions.setToolTab
setToolTab : stateActions.setToolTab
};
export default connect(
@@ -11,11 +11,11 @@ const styles = () =>
({
root :
{
padding : '0.5rem',
width : '100%',
overflow : 'hidden',
cursor : 'auto',
display : 'flex'
padding : '0.5rem',
width : '100%',
overflow : 'hidden',
cursor : 'auto',
display : 'flex'
},
listPeer :
{
@@ -68,7 +68,7 @@ const styles = () =>
backgroundImage : `url(${HandIcon})`,
opacity : 1
}
},
}
});
const ListMe = (props) =>
@@ -16,11 +16,11 @@ const styles = () =>
({
root :
{
padding : '0.5rem',
width : '100%',
overflow : 'hidden',
cursor : 'auto',
display : 'flex'
padding : '0.5rem',
width : '100%',
overflow : 'hidden',
cursor : 'auto',
display : 'flex'
},
listPeer :
{
@@ -36,7 +36,7 @@ const styles = (theme) =>
cursor : 'pointer',
'&.selected' :
{
backgroundColor: 'rgba(55, 126, 255, 1)'
backgroundColor : 'rgba(55, 126, 255, 1)'
},
'&:not(:last-child)' :
{
@@ -11,7 +11,7 @@ import ResizeObserver from 'resize-observer-polyfill';
const RATIO = 1.334;
const PADDING = 100;
const styles = (theme) =>
const styles = () =>
({
root :
{
@@ -162,7 +162,7 @@ class Democratic extends React.PureComponent
}
else
{
return('');
return ('');
}
})}
{ spotlightsLength < Object.keys(peers).length ?
+6 -6
View File
@@ -9,7 +9,7 @@ import { withRoomContext } from '../../RoomContext';
import Peer from '../Containers/Peer';
import HiddenPeers from '../Containers/HiddenPeers';
const styles = (theme) =>
const styles = () =>
({
root :
{
@@ -70,11 +70,11 @@ const styles = (theme) =>
},
filmContent :
{
height : '100%',
width : '100%',
border : '1px solid rgba(255,255,255,0.15)',
maxWidth : 'calc(18vh * (4 / 3))',
cursor : 'pointer',
height : '100%',
width : '100%',
border : '1px solid rgba(255,255,255,0.15)',
maxWidth : 'calc(18vh * (4 / 3))',
cursor : 'pointer',
'& .screen' :
{
maxWidth : 'calc(18vh * (2 * 4 / 3))',
+3 -3
View File
@@ -28,9 +28,9 @@ AudioPeers.propTypes =
};
const mapStateToProps = (state) =>
({
peers : state.peers
});
({
peers : state.peers
});
const AudioPeersContainer = connect(
mapStateToProps
+32 -32
View File
@@ -5,9 +5,9 @@ import { withStyles } from '@material-ui/core/styles';
import * as appPropTypes from '../appPropTypes';
import EditableInput from '../Controls/EditableInput';
const styles = (theme) =>
const styles = () =>
({
root:
root :
{
position : 'relative',
flex : '100 100 auto',
@@ -32,7 +32,7 @@ const styles = (theme) =>
transitionProperty : 'opacity',
transitionDuration : '.15s',
backgroundColor : 'var(--peer-video-bg-color)',
'&.is-me' :
'&.is-me' :
{
transform : 'scaleX(-1)'
},
@@ -71,11 +71,11 @@ const styles = (theme) =>
backgroundColor : 'rgba(0, 0, 0, 0.25)',
'& p' :
{
userSelect : 'none',
pointerEvents : 'none',
margin : 0,
color : 'rgba(255, 255, 255, 0.7)',
fontSize : 10,
userSelect : 'none',
pointerEvents : 'none',
margin : 0,
color : 'rgba(255, 255, 255, 0.7)',
fontSize : 10,
'&:last-child' :
{
@@ -108,24 +108,24 @@ const styles = (theme) =>
},
displayNameStatic :
{
userSelect : 'none',
cursor : 'text',
fontSize : 14,
fontWeight : 400,
color : 'rgba(255, 255, 255, 0.85)',
'&:hover' :
userSelect : 'none',
cursor : 'text',
fontSize : 14,
fontWeight : 400,
color : 'rgba(255, 255, 255, 0.85)',
'&:hover' :
{
backgroundColor: 'rgb(174, 255, 0, 0.25)'
backgroundColor : 'rgb(174, 255, 0, 0.25)'
}
},
deviceInfo :
{
marginTop : '0.4vmin',
display : 'flex',
flexDirection : 'row',
justifyContent : 'flex-start',
alignItems : 'flex-end',
'& span' :
marginTop : '0.4vmin',
display : 'flex',
flexDirection : 'row',
justifyContent : 'flex-start',
alignItems : 'flex-end',
'& span' :
{
userSelect : 'none',
pointerEvents : 'none',
@@ -143,7 +143,7 @@ const styles = (theme) =>
display : 'flex',
flexDirection : 'column',
justifyContent : 'center',
alignItems : 'center',
alignItems : 'center'
},
volumeBar :
{
@@ -157,52 +157,52 @@ const styles = (theme) =>
height : 0,
backgroundColor : 'rgba(255, 255, 0, 0.65)'
},
'&.level1' :
'&.level1' :
{
height : '10%',
backgroundColor : 'rgba(255, 255, 0, 0.65)'
},
'&.level2' :
'&.level2' :
{
height : '20%',
backgroundColor : 'rgba(255, 255, 0, 0.65)'
},
'&.level3' :
'&.level3' :
{
height : '30%',
backgroundColor : 'rgba(255, 255, 0, 0.65)'
},
'&.level4' :
'&.level4' :
{
height : '40%',
backgroundColor : 'rgba(255, 165, 0, 0.65)'
},
'&.level5' :
'&.level5' :
{
height : '50%',
backgroundColor : 'rgba(255, 165, 0, 0.65)'
},
'&.level6' :
'&.level6' :
{
height : '60%',
backgroundColor : 'rgba(255, 0, 0, 0.65)'
},
'&.level7' :
'&.level7' :
{
height : '70%',
backgroundColor : 'rgba(255, 0, 0, 0.65)'
},
'&.level8' :
'&.level8' :
{
height : '80%',
backgroundColor : 'rgba(0, 0, 0, 0.65)'
},
'&.level9' :
'&.level9' :
{
height : '90%',
backgroundColor : 'rgba(0, 0, 0, 0.65)'
},
'&.level10' :
'&.level10' :
{
height : '100%',
backgroundColor : 'rgba(0, 0, 0, 0.65)'
@@ -5,7 +5,7 @@ import { withStyles } from '@material-ui/core/styles';
const styles = () =>
({
root:
root :
{
position : 'relative',
flex : '100 100 auto',
@@ -30,7 +30,7 @@ const styles = () =>
transitionProperty : 'opacity',
transitionDuration : '.15s',
backgroundColor : 'var(--peer-video-bg-color)',
'&.is-me' :
'&.is-me' :
{
transform : 'scaleX(-1)'
},
@@ -69,11 +69,11 @@ const styles = () =>
backgroundColor : 'rgba(0, 0, 0, 0.25)',
'& p' :
{
userSelect : 'none',
pointerEvents : 'none',
margin : 0,
color : 'rgba(255, 255, 255, 0.7)',
fontSize : 10,
userSelect : 'none',
pointerEvents : 'none',
margin : 0,
color : 'rgba(255, 255, 255, 0.7)',
fontSize : 10,
'&:last-child' :
{