Skip to content

Commit

Permalink
Merge pull request #69 from shd101wyy/0.3.2
Browse files Browse the repository at this point in the history
0.3.2
  • Loading branch information
shd101wyy authored Jan 9, 2018
2 parents 7d6917d + 6ec49d7 commit f53e5aa
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 12 deletions.
45 changes: 34 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@
"solarized-light.css",
"twilight.css",
"vs.css",
"vue.css",
"xonokai.css"
]
},
Expand All @@ -300,7 +301,8 @@
"one-dark.css",
"one-light.css",
"solarized-dark.css",
"solarized-light.css"
"solarized-light.css",
"vue.css"
]
},
"markdown-preview-enhanced.revealjsTheme": {
Expand Down Expand Up @@ -338,9 +340,30 @@
"type": "string",
"enum": [
"imgur",
"sm.ms"
"sm.ms",
"qiniu"
]
},
"markdown-preview-enhanced.AccessKey": {
"type": "string",
"default": "",
"description": "Qiniu AccessKey"
},
"markdown-preview-enhanced.SecretKey": {
"type": "string",
"default": "",
"description": "Qiniu SecretKey"
},
"markdown-preview-enhanced.Bucket": {
"type": "string",
"default": "",
"description": "Qiniu Bucket"
},
"markdown-preview-enhanced.Domain": {
"type": "string",
"default": "http://",
"description": "Qiniu Domain"
},
"markdown-preview-enhanced.printBackground": {
"description": "Whether to print background for file export or not. If set to `false`, then `github-light` preview theme will be used. You can also set `print_background` in front-matter for individual files.",
"default": false,
Expand Down Expand Up @@ -387,15 +410,15 @@
"package": "vsce package"
},
"dependencies": {
"@shd101wyy/mume": "^0.2.6"
"@shd101wyy/mume": "^0.2.8"
},
"devDependencies": {
"@types/jquery": "^2.0.46",
"@types/mocha": "^2.2.32",
"@types/node": "^6.0.40",
"eslint": "^3.6.0",
"mocha": "^2.3.3",
"typescript": "^2.0.3",
"vscode": "^1.0.0"
"@types/jquery": "^3.2.17",
"@types/mocha": "^2.2.46",
"@types/node": "^9.3.0",
"eslint": "^4.15.0",
"mocha": "^4.1.0",
"typescript": "^2.6.2",
"vscode": "^1.1.10"
}
}
}
8 changes: 7 additions & 1 deletion src/image-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ export function uploadImageFile(sourceUri: any, imageFilePath: string, imageUplo
textEditorEdit.insert(curPos, hint)
})

utility.uploadImage(imageFilePath, {method:imageUploader})
const config = vscode.workspace.getConfiguration('markdown-preview-enhanced')
const AccessKey = config.get<string>('AccessKey') || ''
const SecretKey = config.get<string>('SecretKey') || ''
const Bucket = config.get<string>('Bucket') || ''
const Domain = config.get<string>('Domain') || ''

utility.uploadImage(imageFilePath, {method:imageUploader, qiniu: {AccessKey, SecretKey, Bucket, Domain}})
.then((url)=> {
setUploadedImageURL(imageFileName, url, editor, hint, curPos)
})
Expand Down

0 comments on commit f53e5aa

Please sign in to comment.