Lint clean up
parent
2f19746fa9
commit
77298b6f2e
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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) =>
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const styles = () =>
|
|||
backgroundImage : `url(${HandIcon})`,
|
||||
opacity : 1
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
const ListMe = (props) =>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import ResizeObserver from 'resize-observer-polyfill';
|
|||
const RATIO = 1.334;
|
||||
const PADDING = 100;
|
||||
|
||||
const styles = (theme) =>
|
||||
const styles = () =>
|
||||
({
|
||||
root :
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { withRoomContext } from '../../RoomContext';
|
|||
import Peer from '../Containers/Peer';
|
||||
import HiddenPeers from '../Containers/HiddenPeers';
|
||||
|
||||
const styles = (theme) =>
|
||||
const styles = () =>
|
||||
({
|
||||
root :
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { withStyles } from '@material-ui/core/styles';
|
|||
import * as appPropTypes from '../appPropTypes';
|
||||
import EditableInput from '../Controls/EditableInput';
|
||||
|
||||
const styles = (theme) =>
|
||||
const styles = () =>
|
||||
({
|
||||
root :
|
||||
{
|
||||
|
|
@ -143,7 +143,7 @@ const styles = (theme) =>
|
|||
display : 'flex',
|
||||
flexDirection : 'column',
|
||||
justifyContent : 'center',
|
||||
alignItems : 'center',
|
||||
alignItems : 'center'
|
||||
},
|
||||
volumeBar :
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,9 +59,11 @@ function run()
|
|||
|
||||
const peerName = randomString({ length: 8 }).toLowerCase();
|
||||
const urlParser = new UrlParse(window.location.href, true);
|
||||
|
||||
let roomId = (urlParser.pathname).substr(1)
|
||||
? (urlParser.pathname).substr(1).toLowerCase() : urlParser.query.roomId.toLowerCase();
|
||||
const produce = urlParser.query.produce !== 'false';
|
||||
|
||||
let displayName = urlParser.query.displayName;
|
||||
const useSimulcast = urlParser.query.simulcast === 'true';
|
||||
|
||||
|
|
@ -94,6 +96,7 @@ function run()
|
|||
|
||||
// Get displayName from cookie (if not already given as param).
|
||||
const userCookie = cookiesManager.getUser() || {};
|
||||
|
||||
let displayNameSet;
|
||||
|
||||
if (!displayName)
|
||||
|
|
@ -116,7 +119,14 @@ function run()
|
|||
stateActions.setRoomUrl(roomUrl));
|
||||
|
||||
store.dispatch(
|
||||
stateActions.setMe({ peerName, displayName, displayNameSet, device, loginEnabled: window.config.loginEnabled }));
|
||||
stateActions.setMe({
|
||||
peerName,
|
||||
displayName,
|
||||
displayNameSet,
|
||||
device,
|
||||
loginEnabled : window.config.loginEnabled
|
||||
})
|
||||
);
|
||||
|
||||
roomClient = new RoomClient(
|
||||
{ roomId, peerName, displayName, device, useSimulcast, produce });
|
||||
|
|
|
|||
|
|
@ -24,12 +24,7 @@ export function register(config)
|
|||
checkValidServiceWorker(swUrl, config);
|
||||
|
||||
navigator.serviceWorker.ready.then(() =>
|
||||
{
|
||||
console.log(
|
||||
'This web app is being served cache-first by a service ' +
|
||||
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|
||||
);
|
||||
});
|
||||
{});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -58,30 +53,17 @@ function registerValidSW(swUrl, config)
|
|||
{
|
||||
if (navigator.serviceWorker.controller)
|
||||
{
|
||||
console.log(
|
||||
'New content is available and will be used when all ' +
|
||||
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
||||
);
|
||||
|
||||
if (config && config.onUpdate)
|
||||
config.onUpdate(registration);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('Content is cached for offline use.');
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onSuccess)
|
||||
else if (config && config.onSuccess)
|
||||
config.onSuccess(registration);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
})
|
||||
.catch((error) =>
|
||||
{
|
||||
console.error('Error during service worker registration:', error);
|
||||
});
|
||||
.catch(() =>
|
||||
{});
|
||||
}
|
||||
|
||||
function checkValidServiceWorker(swUrl, config)
|
||||
|
|
@ -90,6 +72,7 @@ function checkValidServiceWorker(swUrl, config)
|
|||
.then((response) =>
|
||||
{
|
||||
const contentType = response.headers.get('content-type');
|
||||
|
||||
if (response.status === 404 ||
|
||||
(contentType != null && contentType.indexOf('javascript') === -1))
|
||||
{
|
||||
|
|
@ -107,11 +90,7 @@ function checkValidServiceWorker(swUrl, config)
|
|||
}
|
||||
})
|
||||
.catch(() =>
|
||||
{
|
||||
console.log(
|
||||
'No internet connection found. App is running in offline mode.'
|
||||
);
|
||||
});
|
||||
{});
|
||||
}
|
||||
|
||||
export function unregister()
|
||||
|
|
|
|||
Loading…
Reference in New Issue