🚧 WIP: gallery db in progress

This commit is contained in:
PiEgg
2021-07-25 23:25:36 +08:00
parent 12cecc27e7
commit 76964ff1a5
48 changed files with 530 additions and 469 deletions

View File

@@ -1,10 +1,17 @@
import { Component, Vue } from 'vue-property-decorator'
import { ipcRenderer } from 'electron'
import { IConfig } from 'picgo/dist/src/types'
@Component
export default class extends Vue {
defaultPicBed = this.$db.get('picBed.uploader') || this.$db.get('picBed.current') || 'smms'
defaultPicBed = 'smms'
async created () {
const config = await this.getConfig<IConfig>()
if (config) {
this.defaultPicBed = config?.picBed?.uploader || config?.picBed?.current || 'smms'
}
}
setDefaultPicBed (type: string) {
this.letPicGoSaveData({
this.saveConfig({
'picBed.current': type,
'picBed.uploader': type
})