Skip to content

Commit

Permalink
Add Google Photos to example (#259)
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
3 people authored Jul 11, 2024
1 parent fc2c977 commit 9a1ee3f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"@uppy/dropbox": "latest",
"@uppy/golden-retriever": "latest",
"@uppy/google-drive": "latest",
"@uppy/google-photos": "latest",
"@uppy/image-editor": "latest",
"@uppy/instagram": "latest",
"@uppy/locales": "latest",
Expand Down
4 changes: 0 additions & 4 deletions src/pages/examples.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
accent-color: #f37;
}

.main input[type='checkbox']:not(:checked) + label {
color: gray;
}

.main input[type='checkbox']:not(:checked, :disabled):hover + label {
color: black;
}
Expand Down
12 changes: 12 additions & 0 deletions src/pages/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Dashboard from '@uppy/react/lib/Dashboard';
import UppyCore from '@uppy/core';
import Webcam from '@uppy/webcam';
import GoogleDrive from '@uppy/google-drive';
import GooglePhotos from '@uppy/google-photos';
import Instagram from '@uppy/instagram';
import Dropbox from '@uppy/dropbox';
import OneDrive from '@uppy/onedrive';
Expand Down Expand Up @@ -61,6 +62,7 @@ const initialState: State = {
plugins: [
'Webcam',
'GoogleDrive',
'GooglePhotos',
'Dropbox',
'Url',
'OneDrive',
Expand Down Expand Up @@ -105,6 +107,11 @@ const options = [
value: 'GoogleDrive',
type: 'plugins',
},
{
label: 'Google Photos',
value: 'GooglePhotos',
type: 'plugins',
},
{
label: 'Dropbox',
value: 'Dropbox',
Expand Down Expand Up @@ -221,6 +228,11 @@ const Uppy = ({ state, locale }) => {
},
});
}
if (state.plugins.includes('GooglePhotos')) {
uppy.use(GooglePhotos, {
companionUrl,
});
}
if (state.plugins.includes('Dropbox')) {
uppy.use(Dropbox, { companionUrl });
}
Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3745,7 +3745,7 @@ __metadata:
languageName: node
linkType: hard

"@uppy/google-photos@npm:^0.2.0":
"@uppy/google-photos@npm:^0.2.0, @uppy/google-photos@npm:latest":
version: 0.2.0
resolution: "@uppy/google-photos@npm:0.2.0"
dependencies:
Expand Down Expand Up @@ -16086,6 +16086,7 @@ __metadata:
"@uppy/dropbox": "npm:latest"
"@uppy/golden-retriever": "npm:latest"
"@uppy/google-drive": "npm:latest"
"@uppy/google-photos": "npm:latest"
"@uppy/image-editor": "npm:latest"
"@uppy/instagram": "npm:latest"
"@uppy/locales": "npm:latest"
Expand Down

0 comments on commit 9a1ee3f

Please sign in to comment.