diff --git a/src/main/index.js b/src/main/index.js index 4ab0b2a..b4c4e04 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -323,7 +323,12 @@ const uploadClipboardFiles = async () => { imgUrl } } - const win = settingWindow || window + let win + if (miniWindow.isVisible) { + win = miniWindow + } else { + win = settingWindow || window + } img = await uploader(uploadImg, 'imgFromClipboard', win.webContents) if (img !== false) { if (img.length > 0) { diff --git a/src/renderer/components/MiniPage.vue b/src/renderer/components/MiniPage.vue index d641070..efefc1c 100644 --- a/src/renderer/components/MiniPage.vue +++ b/src/renderer/components/MiniPage.vue @@ -123,6 +123,12 @@ export default { _this.$electron.ipcRenderer.send('openSettingWindow') } }, + { + label: '剪贴板图片上传', + click () { + _this.$electron.ipcRenderer.send('uploadClipboardFilesFromUploadPage') + } + }, { role: 'quit', label: '退出'