mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-07 06:22:46 +08:00
Added: upload notification swtich
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -66,6 +66,16 @@
|
||||
@change="handleAutoRename"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="开启上传提示"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.uploadNotification"
|
||||
active-text="开"
|
||||
inactive-text="关"
|
||||
@change="handleUploadNotification"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="选择显示的图床"
|
||||
>
|
||||
@@ -190,7 +200,8 @@ export default {
|
||||
showPicBedList: [],
|
||||
autoStart: this.$db.get('picBed.autoStart').value() || false,
|
||||
rename: this.$db.get('picBed.rename').value() || false,
|
||||
autoRename: this.$db.get('picBed.autoRename').value() || false
|
||||
autoRename: this.$db.get('picBed.autoRename').value() || false,
|
||||
uploadNotification: this.$db.get('picBed.uploadNotification').value() || false
|
||||
},
|
||||
picBed: this.$picBed,
|
||||
keyBindingVisible: false,
|
||||
@@ -302,6 +313,9 @@ export default {
|
||||
},
|
||||
cancelCheckVersion () {
|
||||
this.checkUpdateVisible = false
|
||||
},
|
||||
handleUploadNotification (val) {
|
||||
this.$db.read().set('picBed.uploadNotification', val).write()
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
|
||||
Reference in New Issue
Block a user