Mostly working mediasoup v3
This commit is contained in:
@@ -55,7 +55,7 @@ class File extends React.PureComponent
|
||||
{
|
||||
const {
|
||||
roomClient,
|
||||
torrentSupport,
|
||||
canShareFiles,
|
||||
file,
|
||||
classes
|
||||
} = this.props;
|
||||
@@ -105,7 +105,7 @@ class File extends React.PureComponent
|
||||
<Typography className={classes.text}>
|
||||
{magnet.decode(file.magnetUri).dn}
|
||||
</Typography>
|
||||
{ torrentSupport ?
|
||||
{ canShareFiles ?
|
||||
<Button
|
||||
variant='contained'
|
||||
component='span'
|
||||
@@ -145,17 +145,17 @@ class File extends React.PureComponent
|
||||
}
|
||||
|
||||
File.propTypes = {
|
||||
roomClient : PropTypes.object.isRequired,
|
||||
torrentSupport : PropTypes.bool.isRequired,
|
||||
file : PropTypes.object.isRequired,
|
||||
classes : PropTypes.object.isRequired
|
||||
roomClient : PropTypes.object.isRequired,
|
||||
canShareFiles : PropTypes.bool.isRequired,
|
||||
file : PropTypes.object.isRequired,
|
||||
classes : PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
const mapStateToProps = (state, { magnetUri }) =>
|
||||
{
|
||||
return {
|
||||
file : state.files[magnetUri],
|
||||
torrentSupport : state.room.torrentSupport
|
||||
file : state.files[magnetUri],
|
||||
canShareFiles : state.me.canShareFiles
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ class FileSharing extends React.PureComponent
|
||||
render()
|
||||
{
|
||||
const {
|
||||
torrentSupport,
|
||||
canShareFiles,
|
||||
classes
|
||||
} = this.props;
|
||||
|
||||
const buttonDescription = torrentSupport ?
|
||||
const buttonDescription = canShareFiles ?
|
||||
'Share file' : 'File sharing not supported';
|
||||
|
||||
return (
|
||||
@@ -67,7 +67,7 @@ class FileSharing extends React.PureComponent
|
||||
variant='contained'
|
||||
component='span'
|
||||
className={classes.button}
|
||||
disabled={!torrentSupport}
|
||||
disabled={!canShareFiles}
|
||||
>
|
||||
{buttonDescription}
|
||||
</Button>
|
||||
@@ -80,17 +80,17 @@ class FileSharing extends React.PureComponent
|
||||
}
|
||||
|
||||
FileSharing.propTypes = {
|
||||
roomClient : PropTypes.any.isRequired,
|
||||
torrentSupport : PropTypes.bool.isRequired,
|
||||
tabOpen : PropTypes.bool.isRequired,
|
||||
classes : PropTypes.object.isRequired
|
||||
roomClient : PropTypes.any.isRequired,
|
||||
canShareFiles : PropTypes.bool.isRequired,
|
||||
tabOpen : PropTypes.bool.isRequired,
|
||||
classes : PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) =>
|
||||
{
|
||||
return {
|
||||
torrentSupport : state.room.torrentSupport,
|
||||
tabOpen : state.toolarea.currentToolTab === 'files'
|
||||
canShareFiles : state.me.canShareFiles,
|
||||
tabOpen : state.toolarea.currentToolTab === 'files'
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user