Added: clipboard upload menu for mini page

This commit is contained in:
Molunerfinn 2018-07-07 15:06:36 +08:00
parent 0f4901bdbf
commit c9ecef60e3
2 changed files with 12 additions and 1 deletions

View File

@ -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) {

View File

@ -123,6 +123,12 @@ export default {
_this.$electron.ipcRenderer.send('openSettingWindow')
}
},
{
label: '剪贴板图片上传',
click () {
_this.$electron.ipcRenderer.send('uploadClipboardFilesFromUploadPage')
}
},
{
role: 'quit',
label: '退出'