Added: upload notification swtich

This commit is contained in:
Molunerfinn
2018-06-05 20:03:53 +08:00
parent 947e49ab4a
commit 3455512c47
2 changed files with 22 additions and 6 deletions

View File

@@ -12,11 +12,13 @@ const checkUploader = (type) => {
}
const uploader = (img, type, webContents) => {
const notification = new Notification({
title: '上传进度',
body: '正在上传'
})
notification.show()
if (db.read().get('picBed.uploadNotification').value()) {
const notification = new Notification({
title: '上传进度',
body: '正在上传'
})
notification.show()
}
const uploadType = db.read().get('picBed.current').value()
if (checkUploader(uploadType)) {
return picBeds[uploadType](img, type, webContents)