mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-09 13:58:12 -05:00
parent
6db86ec359
commit
407b821aca
@ -540,6 +540,7 @@ app.on('ready', () => {
|
|||||||
globalShortcut.register(db.read().get('settings.shortKey.upload').value(), () => {
|
globalShortcut.register(db.read().get('settings.shortKey.upload').value(), () => {
|
||||||
uploadClipboardFiles()
|
uploadClipboardFiles()
|
||||||
})
|
})
|
||||||
|
if (process.env.NODE_ENV !== 'development') {
|
||||||
let files = getUploadFiles()
|
let files = getUploadFiles()
|
||||||
if (files.length > 0) { // 如果有文件列表作为参数,说明是命令行启动
|
if (files.length > 0) { // 如果有文件列表作为参数,说明是命令行启动
|
||||||
let win
|
let win
|
||||||
@ -550,6 +551,7 @@ app.on('ready', () => {
|
|||||||
}
|
}
|
||||||
uploadChoosedFiles(win.webContents, files)
|
uploadChoosedFiles(win.webContents, files)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
app.on('window-all-closed', () => {
|
app.on('window-all-closed', () => {
|
||||||
|
@ -181,7 +181,9 @@ const handleRemoveFiles = (ipcMain, CONFIG_PATH) => {
|
|||||||
ipcMain.on('removeFiles', (event, files) => {
|
ipcMain.on('removeFiles', (event, files) => {
|
||||||
const picgo = new PicGo(CONFIG_PATH)
|
const picgo = new PicGo(CONFIG_PATH)
|
||||||
const guiApi = new GuiApi(ipcMain, event.sender, picgo)
|
const guiApi = new GuiApi(ipcMain, event.sender, picgo)
|
||||||
|
setTimeout(() => {
|
||||||
picgo.emit('remove', files, guiApi)
|
picgo.emit('remove', files, guiApi)
|
||||||
|
}, 500)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user