mirror of
https://github.com/marktext/marktext.git
synced 2025-05-19 02:10:34 +08:00
Fix can not fetch unsplash pictures (#1518)
This commit is contained in:
parent
ca0905dc60
commit
f1f048f53d
@ -12,7 +12,7 @@ class ImageSelector extends BaseFloat {
|
||||
|
||||
constructor (muya, options) {
|
||||
const name = 'ag-image-selector'
|
||||
const { applicationId, secret } = options
|
||||
const { accessKey } = options
|
||||
options = Object.assign(options, {
|
||||
placement: 'bottom-center',
|
||||
modifiers: {
|
||||
@ -27,8 +27,7 @@ class ImageSelector extends BaseFloat {
|
||||
this.oldVnode = null
|
||||
this.imageInfo = null
|
||||
this.unsplash = new Unsplash({
|
||||
applicationId,
|
||||
secret
|
||||
accessKey
|
||||
})
|
||||
this.photoList = []
|
||||
this.loading = false
|
||||
|
@ -452,8 +452,7 @@ export default {
|
||||
Muya.use(EmojiPicker)
|
||||
Muya.use(ImagePathPicker)
|
||||
Muya.use(ImageSelector, {
|
||||
applicationId: process.env.UNSPLASH_ACCESS_KEY,
|
||||
secret: process.env.UNSPLASH_SECRET_KEY,
|
||||
accessKey: process.env.UNSPLASH_ACCESS_KEY,
|
||||
photoCreatorClick: this.photoCreatorClick
|
||||
})
|
||||
Muya.use(Transformer)
|
||||
|
Loading…
Reference in New Issue
Block a user