mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-30 20:50:52 +08:00
Partly finished: qiniu upload
This commit is contained in:
@@ -109,10 +109,10 @@ export default {
|
||||
this.$electron.ipcRenderer.send('uploadChoosedFiles', sendFiles)
|
||||
},
|
||||
getPasteStyle () {
|
||||
this.pasteStyle = this.$db.get('picBed.pasteStyle').value() || 'markdown'
|
||||
this.pasteStyle = this.$db.read().get('picBed.pasteStyle').value() || 'markdown'
|
||||
},
|
||||
handlePasteStyleChange (val) {
|
||||
this.$db.set('picBed.pasteStyle', val)
|
||||
this.$db.read().set('picBed.pasteStyle', val)
|
||||
.write()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
const config = this.$db.get('picBed.weibo').value()
|
||||
const config = this.$db.read().get('picBed.weibo').value()
|
||||
if (config) {
|
||||
this.form.username = config.username
|
||||
this.form.password = config.password
|
||||
@@ -67,7 +67,7 @@ export default {
|
||||
confirm (formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.weibo', {
|
||||
this.$db.read().set('picBed.weibo', {
|
||||
username: this.form.username,
|
||||
password: this.form.password,
|
||||
quality: this.quality
|
||||
|
||||
@@ -46,15 +46,19 @@
|
||||
this.disableDragFile()
|
||||
this.getData()
|
||||
this.$electron.ipcRenderer.on('dragFiles', (event, files) => {
|
||||
this.$db.get('uploaded').push(...files).write()
|
||||
this.files = this.$db.get('uploaded').slice().reverse().slice(0, 5).value()
|
||||
files.forEach(item => {
|
||||
this.$db.read().get('uploaded').insert(item).write()
|
||||
})
|
||||
this.files = this.$db.read().get('uploaded').slice().reverse().slice(0, 5).value()
|
||||
})
|
||||
this.$electron.ipcRenderer.on('clipboardFiles', (event, files) => {
|
||||
this.clipboardFiles = files
|
||||
})
|
||||
this.$electron.ipcRenderer.on('uploadFiles', (event, files) => {
|
||||
this.$db.get('uploaded').push(...files).write()
|
||||
this.files = this.$db.get('uploaded').slice().reverse().slice(0, 5).value()
|
||||
files.forEach(item => {
|
||||
this.$db.read().get('uploaded').insert(item).write()
|
||||
})
|
||||
this.files = this.$db.read().get('uploaded').slice().reverse().slice(0, 5).value()
|
||||
})
|
||||
},
|
||||
beforeDestroy () {
|
||||
@@ -64,7 +68,7 @@
|
||||
},
|
||||
methods: {
|
||||
getData () {
|
||||
this.files = this.$db.get('uploaded').slice().reverse().slice(0, 5).value()
|
||||
this.files = this.$db.read().get('uploaded').slice().reverse().slice(0, 5).value()
|
||||
},
|
||||
copyTheLink (item) {
|
||||
this.notification.body = item.imgUrl
|
||||
|
||||
Reference in New Issue
Block a user