mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-07-12 16:11:27 +08:00
🐛 Fix(custom): fix delete api
This commit is contained in:
@@ -69,7 +69,7 @@ export const uploadClipboardFiles = async (): Promise<IStringKeyMap> => {
|
|||||||
notification.show()
|
notification.show()
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
await GalleryDB.getInstance().insert(img[0])
|
const inserted = await GalleryDB.getInstance().insert(img[0])
|
||||||
// trayWindow just be created in mac/windows, not in linux
|
// trayWindow just be created in mac/windows, not in linux
|
||||||
trayWindow?.webContents?.send('clipboardFiles', [])
|
trayWindow?.webContents?.send('clipboardFiles', [])
|
||||||
trayWindow?.webContents?.send('uploadFiles', img)
|
trayWindow?.webContents?.send('uploadFiles', img)
|
||||||
@@ -77,8 +77,8 @@ export const uploadClipboardFiles = async (): Promise<IStringKeyMap> => {
|
|||||||
windowManager.get(IWindowList.SETTING_WINDOW)!.webContents?.send('updateGallery')
|
windowManager.get(IWindowList.SETTING_WINDOW)!.webContents?.send('updateGallery')
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
url: handleUrlEncodeWithSetting(img[0].imgUrl as string),
|
url: handleUrlEncodeWithSetting(inserted.imgUrl as string),
|
||||||
fullResult: img[0]
|
fullResult: inserted
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const notification = new Notification({
|
const notification = new Notification({
|
||||||
@@ -149,10 +149,10 @@ export const uploadChoosedFiles = async (
|
|||||||
notification.show()
|
notification.show()
|
||||||
}, i * 100)
|
}, i * 100)
|
||||||
}
|
}
|
||||||
await GalleryDB.getInstance().insert(imgs[i])
|
const inserted = await GalleryDB.getInstance().insert(imgs[i])
|
||||||
result.push({
|
result.push({
|
||||||
url: handleUrlEncodeWithSetting(imgs[i].imgUrl!),
|
url: handleUrlEncodeWithSetting(inserted.imgUrl!),
|
||||||
fullResult: imgs[i]
|
fullResult: inserted
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
handleCopyUrl(pasteText.join('\n'))
|
handleCopyUrl(pasteText.join('\n'))
|
||||||
|
|||||||
Reference in New Issue
Block a user