|
|
@@ -180,35 +180,35 @@ class imageList extends React.Component {
|
|
|
}else if(!isLoaded) {
|
|
|
return <div><LinearProgress /></div>;
|
|
|
} else {
|
|
|
- if (this.state.images.length > 0) {
|
|
|
+ if (this.state.images.length == 0) {
|
|
|
return <div><Alert severity="info">Nothing here :(</Alert></div>
|
|
|
- }
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <Gallery images = { this.state.images }
|
|
|
- enableLightbox = { true }
|
|
|
- enableImageSelection={false}
|
|
|
- currentImageWillChange={this.onCurrentImageChange}
|
|
|
+ } else {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Gallery images={this.state.images}
|
|
|
+ enableLightbox={true}
|
|
|
+ enableImageSelection={false}
|
|
|
+ currentImageWillChange={this.onCurrentImageChange}
|
|
|
|
|
|
- customControls={[
|
|
|
- <Button
|
|
|
- variant="contained"
|
|
|
- size="large"
|
|
|
- style={theme}
|
|
|
- startIcon={<ShareIcon />}
|
|
|
- onClick={this.shareImage.bind(this)}
|
|
|
- >Share</Button>
|
|
|
- ]}/>
|
|
|
+ customControls={[
|
|
|
+ <Button
|
|
|
+ variant="contained"
|
|
|
+ size="large"
|
|
|
+ style={theme}
|
|
|
+ startIcon={<ShareIcon />}
|
|
|
+ onClick={this.shareImage.bind(this)}
|
|
|
+ >Share</Button>
|
|
|
+ ]} />
|
|
|
|
|
|
- <Dialog
|
|
|
- style={{ zIndex: 99999 }}
|
|
|
- open={this.state.open}
|
|
|
- maxWidth="md"
|
|
|
- fullWidth="true"
|
|
|
- onClose={this.handleDialogClose}
|
|
|
- >
|
|
|
- <DialogTitle>
|
|
|
- <List>
|
|
|
+ <Dialog
|
|
|
+ style={{ zIndex: 99999 }}
|
|
|
+ open={this.state.open}
|
|
|
+ maxWidth="md"
|
|
|
+ fullWidth="true"
|
|
|
+ onClose={this.handleDialogClose}
|
|
|
+ >
|
|
|
+ <DialogTitle>
|
|
|
+ <List>
|
|
|
<ListItem>
|
|
|
<ListItemAvatar>
|
|
|
<Avatar>
|
|
|
@@ -217,62 +217,63 @@ class imageList extends React.Component {
|
|
|
</ListItemAvatar>
|
|
|
Get link
|
|
|
</ListItem>
|
|
|
- </List>
|
|
|
- </DialogTitle>
|
|
|
- <DialogContent>
|
|
|
- <TextField
|
|
|
- label="Shared link"
|
|
|
- defaultValue="https://arozos.com/share/not_found"
|
|
|
- InputProps={{
|
|
|
- readOnly: true,
|
|
|
- }}
|
|
|
- variant="filled"
|
|
|
- fullWidth="true"
|
|
|
- value={window.location.origin + "/share?id=" + this.state.uuid}
|
|
|
- />
|
|
|
- <br/><br/>
|
|
|
- <TextField
|
|
|
- select
|
|
|
- label="Share option"
|
|
|
- value={this.state.mode}
|
|
|
- onChange={this.handleChange}
|
|
|
- SelectProps={{
|
|
|
- native: true,
|
|
|
- }}
|
|
|
- variant="outlined"
|
|
|
- fullWidth="true"
|
|
|
- >
|
|
|
- {[
|
|
|
- {
|
|
|
- label: 'Anyone with the link',
|
|
|
- value: 'anyone',
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'Anyone signed in',
|
|
|
- value: 'signedin',
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'Users in the same group',
|
|
|
- value: 'samegroup',
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'Not public',
|
|
|
- value: 'remove',
|
|
|
- },
|
|
|
- ].map((option) => (
|
|
|
- <option key={option.value} value={option.value}>
|
|
|
- {option.label}
|
|
|
- </option>
|
|
|
- ))}
|
|
|
- </TextField>
|
|
|
- <br /><br/>
|
|
|
- <Button variant="contained" color="primary" onClick={this.handleDialogClose}>
|
|
|
- Done
|
|
|
+ </List>
|
|
|
+ </DialogTitle>
|
|
|
+ <DialogContent>
|
|
|
+ <TextField
|
|
|
+ label="Shared link"
|
|
|
+ defaultValue="https://arozos.com/share/not_found"
|
|
|
+ InputProps={{
|
|
|
+ readOnly: true,
|
|
|
+ }}
|
|
|
+ variant="filled"
|
|
|
+ fullWidth="true"
|
|
|
+ value={window.location.origin + "/share?id=" + this.state.uuid}
|
|
|
+ />
|
|
|
+ <br /><br />
|
|
|
+ <TextField
|
|
|
+ select
|
|
|
+ label="Share option"
|
|
|
+ value={this.state.mode}
|
|
|
+ onChange={this.handleChange}
|
|
|
+ SelectProps={{
|
|
|
+ native: true,
|
|
|
+ }}
|
|
|
+ variant="outlined"
|
|
|
+ fullWidth="true"
|
|
|
+ >
|
|
|
+ {[
|
|
|
+ {
|
|
|
+ label: 'Anyone with the link',
|
|
|
+ value: 'anyone',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'Anyone signed in',
|
|
|
+ value: 'signedin',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'Users in the same group',
|
|
|
+ value: 'samegroup',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'Not public',
|
|
|
+ value: 'remove',
|
|
|
+ },
|
|
|
+ ].map((option) => (
|
|
|
+ <option key={option.value} value={option.value}>
|
|
|
+ {option.label}
|
|
|
+ </option>
|
|
|
+ ))}
|
|
|
+ </TextField>
|
|
|
+ <br /><br />
|
|
|
+ <Button variant="contained" color="primary" onClick={this.handleDialogClose}>
|
|
|
+ Done
|
|
|
</Button>
|
|
|
- </DialogContent>
|
|
|
- </Dialog>
|
|
|
- </div >
|
|
|
- );
|
|
|
+ </DialogContent>
|
|
|
+ </Dialog>
|
|
|
+ </div >
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|