Compare commits

..
2 Commits
Author SHA1 Message Date
Molunerfinn e0bb8480a2 1.6.2 2018-08-08 11:24:21 +08:00
Molunerfinn d4c04ee1e6 Updated: electron version & fixed smms pic type 2018-08-08 11:21:08 +08:00
5 changed files with 28 additions and 7 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "picgo",
"version": "1.6.1",
"version": "1.6.2",
"author": "Molunerfinn <marksz@teamsz.xyz>",
"description": "Easy to upload your pic & copy to write",
"license": "MIT",
@@ -111,7 +111,7 @@
"css-loader": "^0.28.4",
"del": "^3.0.0",
"devtron": "^1.4.0",
"electron": "^1.7.5",
"electron": "1.8.7",
"electron-builder": "^19.19.1",
"electron-debug": "^1.4.0",
"electron-devtools-installer": "^2.2.0",
+9
View File
@@ -354,6 +354,9 @@ const uploadClipboardFiles = async () => {
notification.show()
window.webContents.send('clipboardFiles', [])
window.webContents.send('uploadFiles', img)
if (settingWindow) {
settingWindow.webContents.send('updateGallery')
}
} else {
const notification = new Notification({
title: '上传不成功',
@@ -396,6 +399,9 @@ ipcMain.on('uploadClipboardFiles', async (evt, file) => {
notification.show()
window.webContents.send('clipboardFiles', [])
window.webContents.send('uploadFiles', img)
if (settingWindow) {
settingWindow.webContents.send('updateGallery')
}
} else {
uploadFailed()
}
@@ -423,6 +429,9 @@ ipcMain.on('uploadChoosedFiles', async (evt, files) => {
}
clipboard.writeText(pasteText)
window.webContents.send('uploadFiles', imgs)
if (settingWindow) {
settingWindow.webContents.send('updateGallery')
}
} else {
uploadFailed()
}
+1
View File
@@ -34,6 +34,7 @@ const smmsUpload = async function (img, type, webContents) {
if (body.code === 'success') {
delete imgList[i].base64Image
imgList[i]['imgUrl'] = body.data.url
imgList[i]['type'] = 'smms'
} else {
webContents.send('uploadProgress', -1)
return new Error()
@@ -103,10 +103,18 @@ export default {
},
created () {
this.getGallery()
this.$electron.ipcRenderer.on('updateGallery', (event) => {
this.filterList = this.getGallery()
})
},
computed: {
filterList (val) {
return this.getGallery()
filterList: {
get () {
return this.getGallery()
},
set (val) {
return this.val
}
}
},
methods: {
@@ -264,6 +272,9 @@ export default {
toggleHandleBar () {
this.handleBarActive = !this.handleBarActive
}
},
beforeDestroy () {
this.$electron.ipcRenderer.removeAllListeners('updateGallery')
}
}
</script>
+3 -3
View File
@@ -2982,9 +2982,9 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.27:
version "1.3.27"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d"
electron@^1.7.5:
version "1.8.1"
resolved "https://registry.yarnpkg.com/electron/-/electron-1.8.1.tgz#19b6f39f2013e204a91a60bc3086dc7a4a07ed88"
electron@1.8.7:
version "1.8.7"
resolved "http://registry.npm.taobao.org/electron/download/electron-1.8.7.tgz#373c1dc4589d7ab4acd49aff8db4a1c0a6c3bcc1"
dependencies:
"@types/node" "^8.0.24"
electron-download "^3.0.1"