Merge pull request #292 from Astagor/share_photo_from_mobile_gallery
Added share photo from gallery on mobileauto_join_3.3
commit
24f7bd2a9b
|
|
@ -25,6 +25,10 @@ const styles = (theme) =>
|
||||||
button :
|
button :
|
||||||
{
|
{
|
||||||
margin : theme.spacing(1)
|
margin : theme.spacing(1)
|
||||||
|
},
|
||||||
|
shareButtonsWrapper :
|
||||||
|
{
|
||||||
|
display : 'flex'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -42,6 +46,7 @@ const FileSharing = (props) =>
|
||||||
|
|
||||||
const {
|
const {
|
||||||
canShareFiles,
|
canShareFiles,
|
||||||
|
browser,
|
||||||
canShare,
|
canShare,
|
||||||
classes
|
classes
|
||||||
} = props;
|
} = props;
|
||||||
|
|
@ -57,29 +62,61 @@ const FileSharing = (props) =>
|
||||||
defaultMessage : 'File sharing not supported'
|
defaultMessage : 'File sharing not supported'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const buttonGalleryDescription = canShareFiles ?
|
||||||
|
intl.formatMessage({
|
||||||
|
id : 'label.shareGalleryFile',
|
||||||
|
defaultMessage : 'Share from gallery'
|
||||||
|
})
|
||||||
|
:
|
||||||
|
intl.formatMessage({
|
||||||
|
id : 'label.fileSharingUnsupported',
|
||||||
|
defaultMessage : 'File sharing not supported'
|
||||||
|
});
|
||||||
|
|
||||||
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'
|
||||||
<label htmlFor='share-files-button'>
|
/>
|
||||||
<Button
|
<input
|
||||||
variant='contained'
|
className={classes.input}
|
||||||
component='span'
|
type='file'
|
||||||
className={classes.button}
|
disabled={!canShare}
|
||||||
disabled={!canShareFiles || !canShare}
|
onChange={handleFileChange}
|
||||||
>
|
accept='image/*'
|
||||||
{buttonDescription}
|
id='share-files-gallery-button'
|
||||||
</Button>
|
/>
|
||||||
</label>
|
<label htmlFor='share-files-button'>
|
||||||
|
<Button
|
||||||
|
variant='contained'
|
||||||
|
component='span'
|
||||||
|
className={classes.button}
|
||||||
|
disabled={!canShareFiles || !canShare}
|
||||||
|
>
|
||||||
|
{buttonDescription}
|
||||||
|
</Button>
|
||||||
|
</label>
|
||||||
|
{
|
||||||
|
(browser.platform === 'mobile') && canShareFiles && canShare && <label htmlFor='share-files-gallery-button'>
|
||||||
|
<Button
|
||||||
|
variant='contained'
|
||||||
|
component='span'
|
||||||
|
className={classes.button}
|
||||||
|
disabled={!canShareFiles || !canShare}
|
||||||
|
>
|
||||||
|
{buttonGalleryDescription}
|
||||||
|
</Button>
|
||||||
|
</label>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
<FileList />
|
<FileList />
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
|
|
@ -87,6 +124,7 @@ const FileSharing = (props) =>
|
||||||
|
|
||||||
FileSharing.propTypes = {
|
FileSharing.propTypes = {
|
||||||
roomClient : PropTypes.any.isRequired,
|
roomClient : PropTypes.any.isRequired,
|
||||||
|
browser : PropTypes.object.isRequired,
|
||||||
canShareFiles : PropTypes.bool.isRequired,
|
canShareFiles : PropTypes.bool.isRequired,
|
||||||
tabOpen : PropTypes.bool.isRequired,
|
tabOpen : PropTypes.bool.isRequired,
|
||||||
canShare : PropTypes.bool.isRequired,
|
canShare : PropTypes.bool.isRequired,
|
||||||
|
|
@ -97,6 +135,7 @@ const mapStateToProps = (state) =>
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
canShareFiles : state.me.canShareFiles,
|
canShareFiles : state.me.canShareFiles,
|
||||||
|
browser : state.me.browser,
|
||||||
tabOpen : state.toolarea.currentToolTab === 'files',
|
tabOpen : state.toolarea.currentToolTab === 'files',
|
||||||
canShare :
|
canShare :
|
||||||
state.me.roles.some((role) =>
|
state.me.roles.some((role) =>
|
||||||
|
|
@ -113,6 +152,7 @@ export default withRoomContext(connect(
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
prev.room.permissionsFromRoles === next.room.permissionsFromRoles &&
|
prev.room.permissionsFromRoles === next.room.permissionsFromRoles &&
|
||||||
|
prev.me.browser === next.me.browser &&
|
||||||
prev.me.roles === next.me.roles &&
|
prev.me.roles === next.me.roles &&
|
||||||
prev.me.canShareFiles === next.me.canShareFiles &&
|
prev.me.canShareFiles === next.me.canShareFiles &&
|
||||||
prev.toolarea.currentToolTab === next.toolarea.currentToolTab
|
prev.toolarea.currentToolTab === next.toolarea.currentToolTab
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "文件共享",
|
"label.filesharing": "文件共享",
|
||||||
"label.participants": "参与者",
|
"label.participants": "参与者",
|
||||||
"label.shareFile": "共享文件",
|
"label.shareFile": "共享文件",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "不支持文件共享",
|
"label.fileSharingUnsupported": "不支持文件共享",
|
||||||
"label.unknown": "未知",
|
"label.unknown": "未知",
|
||||||
"label.democratic": "民主视图",
|
"label.democratic": "民主视图",
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@
|
||||||
"label.filesharing": "Sdílení souborů",
|
"label.filesharing": "Sdílení souborů",
|
||||||
"label.participants": "Účastníci",
|
"label.participants": "Účastníci",
|
||||||
"label.shareFile": "Sdílet soubor",
|
"label.shareFile": "Sdílet soubor",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Sdílení souborů není podporováno",
|
"label.fileSharingUnsupported": "Sdílení souborů není podporováno",
|
||||||
"label.unknown": "Neznámý",
|
"label.unknown": "Neznámý",
|
||||||
"label.democratic": "Rozvržení: Demokratické",
|
"label.democratic": "Rozvržení: Demokratické",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Dateien",
|
"label.filesharing": "Dateien",
|
||||||
"label.participants": "Teilnehmer",
|
"label.participants": "Teilnehmer",
|
||||||
"label.shareFile": "Datei hochladen",
|
"label.shareFile": "Datei hochladen",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Dateifreigabe nicht unterstützt",
|
"label.fileSharingUnsupported": "Dateifreigabe nicht unterstützt",
|
||||||
"label.unknown": "Unbekannt",
|
"label.unknown": "Unbekannt",
|
||||||
"label.democratic": "Demokratisch",
|
"label.democratic": "Demokratisch",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Fildeling",
|
"label.filesharing": "Fildeling",
|
||||||
"label.participants": "Deltagere",
|
"label.participants": "Deltagere",
|
||||||
"label.shareFile": "Del fil",
|
"label.shareFile": "Del fil",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Fildeling er ikke understøttet",
|
"label.fileSharingUnsupported": "Fildeling er ikke understøttet",
|
||||||
"label.unknown": "Ukendt",
|
"label.unknown": "Ukendt",
|
||||||
"label.democracy": "Galleri visning",
|
"label.democracy": "Galleri visning",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Διαμοιρασμοός αρχείου",
|
"label.filesharing": "Διαμοιρασμοός αρχείου",
|
||||||
"label.participants": "Συμμετέχοντες",
|
"label.participants": "Συμμετέχοντες",
|
||||||
"label.shareFile": "Διαμοιραστείτε ένα αρχείο",
|
"label.shareFile": "Διαμοιραστείτε ένα αρχείο",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Ο διαμοιρασμός αρχείων δεν υποστηρίζεται",
|
"label.fileSharingUnsupported": "Ο διαμοιρασμός αρχείων δεν υποστηρίζεται",
|
||||||
"label.unknown": "Άγνωστο",
|
"label.unknown": "Άγνωστο",
|
||||||
"label.democratic": null,
|
"label.democratic": null,
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "File sharing",
|
"label.filesharing": "File sharing",
|
||||||
"label.participants": "Participants",
|
"label.participants": "Participants",
|
||||||
"label.shareFile": "Share file",
|
"label.shareFile": "Share file",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "File sharing not supported",
|
"label.fileSharingUnsupported": "File sharing not supported",
|
||||||
"label.unknown": "Unknown",
|
"label.unknown": "Unknown",
|
||||||
"label.democratic": "Democratic view",
|
"label.democratic": "Democratic view",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Compartir ficheros",
|
"label.filesharing": "Compartir ficheros",
|
||||||
"label.participants": "Participantes",
|
"label.participants": "Participantes",
|
||||||
"label.shareFile": "Compartir fichero",
|
"label.shareFile": "Compartir fichero",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Compartir ficheros no está disponible",
|
"label.fileSharingUnsupported": "Compartir ficheros no está disponible",
|
||||||
"label.unknown": "Desconocido",
|
"label.unknown": "Desconocido",
|
||||||
"label.democratic": "Vista democrática",
|
"label.democratic": "Vista democrática",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Partage de fichier",
|
"label.filesharing": "Partage de fichier",
|
||||||
"label.participants": "Participants",
|
"label.participants": "Participants",
|
||||||
"label.shareFile": "Partager un fichier",
|
"label.shareFile": "Partager un fichier",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Partage de fichier non supporté",
|
"label.fileSharingUnsupported": "Partage de fichier non supporté",
|
||||||
"label.unknown": "Inconnu",
|
"label.unknown": "Inconnu",
|
||||||
"label.democratic": "Vue démocratique",
|
"label.democratic": "Vue démocratique",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Dijeljenje datoteka",
|
"label.filesharing": "Dijeljenje datoteka",
|
||||||
"label.participants": "Sudionici",
|
"label.participants": "Sudionici",
|
||||||
"label.shareFile": "Dijeli datoteku",
|
"label.shareFile": "Dijeli datoteku",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Dijeljenje datoteka nije podržano",
|
"label.fileSharingUnsupported": "Dijeljenje datoteka nije podržano",
|
||||||
"label.unknown": "Nepoznato",
|
"label.unknown": "Nepoznato",
|
||||||
"label.democratic":"Demokratski prikaz",
|
"label.democratic":"Demokratski prikaz",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Fájl megosztás",
|
"label.filesharing": "Fájl megosztás",
|
||||||
"label.participants": "Résztvevők",
|
"label.participants": "Résztvevők",
|
||||||
"label.shareFile": "Fájl megosztása",
|
"label.shareFile": "Fájl megosztása",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Fájl megosztás nem támogatott",
|
"label.fileSharingUnsupported": "Fájl megosztás nem támogatott",
|
||||||
"label.unknown": "Ismeretlen",
|
"label.unknown": "Ismeretlen",
|
||||||
"label.democratic": "Egyforma képméretű képkiosztás",
|
"label.democratic": "Egyforma képméretű képkiosztás",
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@
|
||||||
"label.filesharing": "Condivisione file",
|
"label.filesharing": "Condivisione file",
|
||||||
"label.participants": "Partecipanti",
|
"label.participants": "Partecipanti",
|
||||||
"label.shareFile": "Condividi file",
|
"label.shareFile": "Condividi file",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Condivisione file non supportata",
|
"label.fileSharingUnsupported": "Condivisione file non supportata",
|
||||||
"label.unknown": "Sconosciuto",
|
"label.unknown": "Sconosciuto",
|
||||||
"label.democratic": "Vista Democratica",
|
"label.democratic": "Vista Democratica",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Fildeling",
|
"label.filesharing": "Fildeling",
|
||||||
"label.participants": "Deltakere",
|
"label.participants": "Deltakere",
|
||||||
"label.shareFile": "Del fil",
|
"label.shareFile": "Del fil",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Fildeling ikke støttet",
|
"label.fileSharingUnsupported": "Fildeling ikke støttet",
|
||||||
"label.unknown": "Ukjent",
|
"label.unknown": "Ukjent",
|
||||||
"label.democratic": "Demokratisk",
|
"label.democratic": "Demokratisk",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Udostępnianie plików",
|
"label.filesharing": "Udostępnianie plików",
|
||||||
"label.participants": "Uczestnicy",
|
"label.participants": "Uczestnicy",
|
||||||
"label.shareFile": "Udostępnij plik",
|
"label.shareFile": "Udostępnij plik",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Udostępnianie plików nie jest obsługiwane",
|
"label.fileSharingUnsupported": "Udostępnianie plików nie jest obsługiwane",
|
||||||
"label.unknown": "Nieznane",
|
"label.unknown": "Nieznane",
|
||||||
"label.democratic": "Układ demokratyczny",
|
"label.democratic": "Układ demokratyczny",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Partilha de ficheiro",
|
"label.filesharing": "Partilha de ficheiro",
|
||||||
"label.participants": "Participantes",
|
"label.participants": "Participantes",
|
||||||
"label.shareFile": "Partilhar ficheiro",
|
"label.shareFile": "Partilhar ficheiro",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Partilha de ficheiro não disponível",
|
"label.fileSharingUnsupported": "Partilha de ficheiro não disponível",
|
||||||
"label.unknown": "Desconhecido",
|
"label.unknown": "Desconhecido",
|
||||||
"label.democratic": "Vista democrática",
|
"label.democratic": "Vista democrática",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Partajarea fișierelor",
|
"label.filesharing": "Partajarea fișierelor",
|
||||||
"label.participants": "Participanți",
|
"label.participants": "Participanți",
|
||||||
"label.shareFile": "Partajează fișierul",
|
"label.shareFile": "Partajează fișierul",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Partajarea fișierelor nu este acceptată",
|
"label.fileSharingUnsupported": "Partajarea fișierelor nu este acceptată",
|
||||||
"label.unknown": "Necunoscut",
|
"label.unknown": "Necunoscut",
|
||||||
"label.democratic": "Distribuție egală a dimensiunii imaginii",
|
"label.democratic": "Distribuție egală a dimensiunii imaginii",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Dosya paylaşım",
|
"label.filesharing": "Dosya paylaşım",
|
||||||
"label.participants": "Katılımcı",
|
"label.participants": "Katılımcı",
|
||||||
"label.shareFile": "Dosya paylaş",
|
"label.shareFile": "Dosya paylaş",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Dosya paylaşımı desteklenmiyor",
|
"label.fileSharingUnsupported": "Dosya paylaşımı desteklenmiyor",
|
||||||
"label.unknown": "Bilinmeyen",
|
"label.unknown": "Bilinmeyen",
|
||||||
"label.democratic": "Demokratik görünüm",
|
"label.democratic": "Demokratik görünüm",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@
|
||||||
"label.filesharing": "Обмін файлами",
|
"label.filesharing": "Обмін файлами",
|
||||||
"label.participants": "Учасники",
|
"label.participants": "Учасники",
|
||||||
"label.shareFile": "Надіслати файл",
|
"label.shareFile": "Надіслати файл",
|
||||||
|
"label.shareGalleryFile": null,
|
||||||
"label.fileSharingUnsupported": "Обмін файлами не підтримується",
|
"label.fileSharingUnsupported": "Обмін файлами не підтримується",
|
||||||
"label.unknown": "Невідомо",
|
"label.unknown": "Невідомо",
|
||||||
"label.democrat": "Демократичний вигляд",
|
"label.democrat": "Демократичний вигляд",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue