Skip to content

Commit 40007e0

Browse files
committed
feat: add Unsplash source
1 parent 3710413 commit 40007e0

File tree

6 files changed

+23
-2
lines changed

6 files changed

+23
-2
lines changed

dummy/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
<li><a href="/debug-uploads.html">debug uploads</a></li>
2727
<li><a href="/live.html">live</a></li>
2828
<li><a href="/nft.html">nft</a></li>
29+
<li><a href="/unsplash.html">unsplash</a></li>
2930
<li><a href="/logout.html">logout</a></li>
3031
</ul>

dummy/unsplash.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<meta charset="UTF-8" />
2+
<meta content="width=device-width,initial-scale=1" name="viewport"/>
3+
<script>
4+
UPLOADCARE_PUBLIC_KEY = 'demopublickey'
5+
UPLOADCARE_TABS = 'preview unsplash'
6+
UPLOADCARE_DEBUG_UPLOADS = true
7+
</script>
8+
<script src="./uploadcare.full.js"></script>
9+
10+
<input
11+
type="hidden"
12+
role="uploadcare-uploader"
13+
data-crop="4:5"
14+
preview-step=""
15+
/>

src/locales/en.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ const translations = {
5757
onedrive: 'OneDrive',
5858
flickr: 'Flickr',
5959
huddle: 'Huddle',
60-
nft: 'NFT'
60+
nft: 'NFT',
61+
unsplash: 'Unsplash'
6162
},
6263
file: {
6364
drag: 'drag & drop<br>any files',

src/settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ constraints = {
9999
}
100100
presets = {
101101
tabs: {
102-
all: 'file camera url facebook gdrive gphotos dropbox instagram evernote flickr onedrive box vk huddle',
102+
all: 'file camera url facebook gdrive gphotos dropbox instagram evernote flickr onedrive box vk huddle unsplash',
103103
default: defaults.tabs
104104
}
105105
}

src/svgs/icon-unsplash.svg

Lines changed: 3 additions & 0 deletions
Loading

src/widget/dialog.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ registerTab('box', RemoteTab)
215215
registerTab('onedrive', RemoteTab)
216216
registerTab('huddle', RemoteTab)
217217
registerTab('nft', RemoteTab)
218+
registerTab('unsplash', RemoteTab)
218219
registerTab('empty-pubkey', function (tabPanel, _1, _2, settings) {
219220
return tabPanel.append(emptyKeyText)
220221
})

0 commit comments

Comments
 (0)