-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Merge pull request #433 from CedricProfessionnel/CognitoImportFr…
…omAnnotationWithAssetsFilesFeature Cognito Import from annotation
- Loading branch information
Showing
13 changed files
with
366 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
src/components/ImportFromCognitoS3Dialog/get-annotation-from-aws.js
This file was deleted.
Oops, something went wrong.
77 changes: 0 additions & 77 deletions
77
src/components/ImportFromCognitoS3Dialog/get-images-from-aws.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const getSources = (annotations) => { | ||
return annotations | ||
.map((obj) => obj.source) | ||
.filter((source, index, self) => self.indexOf(source) === index) | ||
} | ||
export default getSources |
61 changes: 61 additions & 0 deletions
61
src/components/ImportFromCognitoS3Dialog/header-table-import.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from "react" | ||
import { | ||
Settings as SettingsIcon, | ||
Storage as StorageIcon, | ||
} from "@material-ui/icons/" | ||
|
||
import { Button, IconButton } from "@material-ui/core/" | ||
|
||
const selectedStyle = { color: "DodgerBlue" } | ||
|
||
const headerTable = ({ configImport, setConfigImport }) => { | ||
const loadAssetsOrAnnotations = () => { | ||
setConfigImport({ | ||
...configImport, | ||
loadAssetsIsSelected: !configImport.loadAssetsIsSelected, | ||
}) | ||
} | ||
return ( | ||
<tr> | ||
<th> | ||
{configImport.loadAssetsIsSelected ? ( | ||
<Button | ||
style={selectedStyle} | ||
onClick={loadAssetsOrAnnotations} | ||
disabled | ||
> | ||
Load Assets | ||
</Button> | ||
) : ( | ||
<Button onClick={loadAssetsOrAnnotations}>Load Assets</Button> | ||
)} | ||
{configImport.loadAssetsIsSelected ? ( | ||
<Button onClick={loadAssetsOrAnnotations}>Load Annotations</Button> | ||
) : ( | ||
<Button | ||
style={selectedStyle} | ||
onClick={loadAssetsOrAnnotations} | ||
disabled | ||
> | ||
Load Annotations | ||
</Button> | ||
)} | ||
<IconButton | ||
onClick={() => { | ||
setConfigImport({ | ||
...configImport, | ||
contentDialogBoxIsSetting: !configImport.contentDialogBoxIsSetting, | ||
}) | ||
}} | ||
> | ||
{configImport.contentDialogBoxIsSetting ? ( | ||
<StorageIcon></StorageIcon> | ||
) : ( | ||
<SettingsIcon></SettingsIcon> | ||
)} | ||
</IconButton> | ||
</th> | ||
</tr> | ||
) | ||
} | ||
export default headerTable |
Oops, something went wrong.