🐛 Fix(db): fix some db bugs

#873,#806
This commit is contained in:
PiEgg
2022-06-12 20:20:08 +08:00
parent 8d861be161
commit d3bb5caa83
27 changed files with 238 additions and 107 deletions

View File

@@ -10,6 +10,11 @@ const getPicBeds = () => {
name: picgo.helper.uploader.get(item)!.name || item,
visible: visible ? visible.visible : true
}
}).sort((a) => {
if (a.type === 'tcyun') {
return -1
}
return 0
}) as IPicBedType[]
return picBeds
}

View File

@@ -1,14 +1,9 @@
import db from '~/main/apis/core/datastore'
import { ipcMain } from 'electron'
import { showMessageBox } from '~/main/utils/common'
import { SHOW_PRIVACY_MESSAGE } from '~/universal/events/constants'
import { T } from '~/universal/i18n'
class PrivacyManager {
async init () {
ipcMain.on(SHOW_PRIVACY_MESSAGE, () => {
this.show(false)
})
async check () {
if (db.get('settings.privacyEnsure') !== true) {
const res = await this.show(true)
// cancel