mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-12 03:00:29 +08:00
🐛 Fix(db): fix some db bugs
#873,#806
This commit is contained in:
@@ -177,7 +177,7 @@ class ShortKeyHandler {
|
||||
keyList.forEach(item => {
|
||||
globalShortcut.unregister(item.key)
|
||||
shortKeyService.unregisterCommand(item.command)
|
||||
picgo.unsetConfig('settings.shortKey', item.command)
|
||||
db.unset('settings.shortKey', item.command)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import logger from '@core/picgo/logger'
|
||||
import { T } from '~/universal/i18n'
|
||||
import fse from 'fs-extra'
|
||||
import path from 'path'
|
||||
import { privacyManager } from '~/main/utils/privacyManager'
|
||||
|
||||
const waitForShow = (webcontent: WebContents) => {
|
||||
return new Promise<void>((resolve) => {
|
||||
@@ -140,6 +141,10 @@ class Uploader {
|
||||
|
||||
async upload (img?: IUploadOption): Promise<ImgInfo[]|false> {
|
||||
try {
|
||||
const privacyCheckRes = await privacyManager.check()
|
||||
if (!privacyCheckRes) {
|
||||
throw Error(T('PRIVACY_TIPS'))
|
||||
}
|
||||
const startTime = Date.now()
|
||||
const output = await picgo.upload(img)
|
||||
if (Array.isArray(output) && output.some((item: ImgInfo) => item.imgUrl)) {
|
||||
|
||||
Reference in New Issue
Block a user