mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-09-06 16:07:06 +08:00
🔨 Refactor: most config handle by picgo-core
for config syncing with picgo-core && picgo-plugins
This commit is contained in:
@@ -90,7 +90,9 @@ export default class extends Vue {
|
||||
// @ts-ignore
|
||||
this.$refs.aliyun.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.aliyun', this.form)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.aliyun': this.form
|
||||
})
|
||||
const successNotification = new window.Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
})
|
||||
|
||||
@@ -81,7 +81,9 @@ export default class extends Vue {
|
||||
// @ts-ignore
|
||||
this.$refs.github.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.github', this.form)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.github': this.form
|
||||
})
|
||||
const successNotification = new Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
})
|
||||
|
||||
@@ -58,7 +58,9 @@ export default class extends Vue {
|
||||
// @ts-ignore
|
||||
this.$refs.imgur.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.imgur', this.form)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.imgur': this.form
|
||||
})
|
||||
const successNotification = new Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
})
|
||||
|
||||
@@ -56,7 +56,9 @@ export default class extends Vue {
|
||||
// @ts-ignore
|
||||
const result = await this.$refs.configForm.validate()
|
||||
if (result !== false) {
|
||||
this.$db.set(`picBed.${this.type}`, result)
|
||||
this.letPicGoSaveData({
|
||||
[`picBed.${this.type}`]: result
|
||||
})
|
||||
const successNotification = new Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
})
|
||||
@@ -66,7 +68,9 @@ export default class extends Vue {
|
||||
}
|
||||
}
|
||||
setDefaultPicBed (type: string) {
|
||||
this.$db.set('picBed.current', type)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.current': type
|
||||
})
|
||||
// @ts-ignore 来自mixin的数据
|
||||
this.defaultPicBed = type
|
||||
const successNotification = new Notification('设置默认图床', {
|
||||
|
||||
@@ -98,7 +98,9 @@ export default class extends Vue {
|
||||
// @ts-ignore
|
||||
this.$refs.qiniu.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.qiniu', this.form)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.qiniu': this.form
|
||||
})
|
||||
const successNotification = new Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
})
|
||||
|
||||
@@ -24,7 +24,9 @@ import mixin from '@/utils/ConfirmButtonMixin'
|
||||
})
|
||||
export default class extends Vue {
|
||||
confirm () {
|
||||
this.$db.set('picBed.smms', true)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.smms': true
|
||||
})
|
||||
// @ts-ignore 来自mixin
|
||||
this.setDefaultPicBed('smms')
|
||||
const successNotification = new window.Notification('设置结果', {
|
||||
|
||||
@@ -114,7 +114,9 @@ export default class extends Vue {
|
||||
// @ts-ignore
|
||||
this.$refs.tcyun.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.tcyun', this.form)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.tcyun': this.form
|
||||
})
|
||||
const successNotification = new window.Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
})
|
||||
|
||||
@@ -89,7 +89,9 @@ export default class extends Vue {
|
||||
// @ts-ignore
|
||||
this.$refs.tcyun.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.upyun', this.form)
|
||||
this.letPicGoSaveData({
|
||||
'picBed.upyun': this.form
|
||||
})
|
||||
const successNotification = new Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
})
|
||||
|
||||
@@ -91,12 +91,14 @@ export default {
|
||||
confirm (formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$db.set('picBed.weibo', {
|
||||
username: this.form.username,
|
||||
password: this.form.password,
|
||||
quality: this.quality,
|
||||
cookie: this.form.cookie,
|
||||
chooseCookie: this.chooseCookie
|
||||
this.letPicGoSaveData({
|
||||
'picBed.weibo': {
|
||||
username: this.form.username,
|
||||
password: this.form.password,
|
||||
quality: this.quality,
|
||||
cookie: this.form.cookie,
|
||||
chooseCookie: this.chooseCookie
|
||||
}
|
||||
})
|
||||
const successNotification = new window.Notification('设置结果', {
|
||||
body: '设置成功'
|
||||
|
||||
Reference in New Issue
Block a user