Added a div to wrapp buttons in FileSharing

auto_join_3.3
Astagor 2020-05-05 08:25:33 +02:00
parent 9e14cfd924
commit 5b8f2d83a9
1 changed files with 45 additions and 39 deletions

View File

@ -25,6 +25,10 @@ const styles = (theme) =>
button : button :
{ {
margin : theme.spacing(1) margin : theme.spacing(1)
},
shareButtonsWrapper :
{
display : 'flex'
} }
}); });
@ -72,45 +76,47 @@ const FileSharing = (props) =>
return ( return (
<Paper className={classes.root}> <Paper className={classes.root}>
<FileSharingModerator /> <FileSharingModerator />
<input <div className={classes.shareButtonsWrapper} >
className={classes.input} <input
type='file' className={classes.input}
disabled={!canShare} type='file'
onChange={handleFileChange} disabled={!canShare}
// Need to reset to be able to share same file twice onChange={handleFileChange}
onClick={(e) => (e.target.value = null)} // Need to reset to be able to share same file twice
id='share-files-button' onClick={(e) => (e.target.value = null)}
/> id='share-files-button'
<input />
className={classes.input} <input
type='file' className={classes.input}
disabled={!canShare} type='file'
onChange={handleFileChange} disabled={!canShare}
accept="image/*" onChange={handleFileChange}
id='share-files-gallery-button' accept="image/*"
/> id='share-files-gallery-button'
<label htmlFor='share-files-button'> />
<Button <label htmlFor='share-files-button'>
variant='contained' <Button
component='span' variant='contained'
className={classes.button} component='span'
disabled={!canShareFiles || !canShare} className={classes.button}
> disabled={!canShareFiles || !canShare}
{buttonDescription} >
</Button> {buttonDescription}
</label> </Button>
{ </label>
(browser.platform === 'mobile') && canShareFiles && canShare && <label htmlFor='share-files-gallery-button'> {
<Button (browser.platform === 'mobile') && canShareFiles && canShare && <label htmlFor='share-files-gallery-button'>
variant='contained' <Button
component='span' variant='contained'
className={classes.button} component='span'
disabled={!canShareFiles || !canShare} className={classes.button}
> disabled={!canShareFiles || !canShare}
{buttonGalleryDescription} >
</Button> {buttonGalleryDescription}
</label> </Button>
} </label>
}
</div>
<FileList /> <FileList />
</Paper> </Paper>
); );