🔨 Refactor: upload module && notification module

This commit is contained in:
PiEgg
2021-03-28 17:44:07 +08:00
parent f9d6191d5e
commit 3cad5f378d
11 changed files with 118 additions and 55 deletions

View File

@@ -17,7 +17,7 @@ function dbChecker () {
if (!fs.existsSync(configFilePath)) {
return
}
let configFile: string = ''
let configFile: string = '{}'
let optionsTpl = {
title: '注意',
body: ''

View File

@@ -14,10 +14,9 @@ if (process.type !== 'renderer') {
if (!fs.pathExistsSync(STORE_PATH)) {
fs.mkdirpSync(STORE_PATH)
}
dbChecker()
}
dbChecker()
class DB {
private db: Datastore.LowdbSync<Datastore.AdapterSync>
constructor () {

View File

@@ -196,6 +196,14 @@ type IUploadOption = string[]
interface IShowNotificationOption {
title: string
body: string
icon?: string | import('electron').NativeImage
}
interface IPrivateShowNotificationOption extends IShowNotificationOption{
/**
* click notification to copy the body
*/
clickToCopy?: boolean
}
interface IShowMessageBoxOption {