Skip to content

Commit

Permalink
✨ Feature: add uploading image from URL support
Browse files Browse the repository at this point in the history
  • Loading branch information
Molunerfinn committed Feb 23, 2020
1 parent 23ba233 commit a28c678
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"keycode": "^2.2.0",
"lodash-id": "^0.14.0",
"lowdb": "^1.0.0",
"picgo": "^1.4.4",
"picgo": "^1.4.5",
"vue": "^2.6.10",
"vue-gallery": "^2.0.1",
"vue-lazyload": "^1.2.6",
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/pages/Upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ export default class extends Vue {
}
handleInputBoxValue (val: string) {
if (val === '') return false
if (val.includes('http://') || val.includes('https://')) {
ipcRenderer.send('uploadChoosedFiles', {
if (val.startsWith('http://') || val.startsWith('https://')) {
ipcRenderer.send('uploadChoosedFiles', [{
path: val
})
}])
} else {
this.$message.error('请输入合法的URL')
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8292,10 +8292,10 @@ performance-now@^2.1.0:
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=

picgo@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.4.4.tgz#4fd2d51793a7f90a144a816c60035ed1f2f76bf2"
integrity sha512-0rieY+qlyfLVhPdwXZSqwitNCifgWJohDnnfHE92tPmP738r35Ab0wfa7eh4LRuI8Gx376FTNdlTIUQ4mHEsxQ==
picgo@^1.4.5:
version "1.4.5"
resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.4.5.tgz#3579aea9017a68c4b1e80e7af9060eb70ab98a9a"
integrity sha512-uef5tkOsswj6XJX2kYlUkuIPhaUS4PNSCMZ3IYgSCZvvxC4e1o8Qro4PIYlMAIEDPqP30OrKNab/wmaJxizv+g==
dependencies:
chalk "^2.4.1"
commander "^2.17.0"
Expand Down

0 comments on commit a28c678

Please sign in to comment.