mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2025-04-21 07:50:19 +08:00
feat: save data in the current folder
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
const { readJSON, saveJSON, decipherAes, cipherAes, detectLocale } = require('./utils')
|
||||
const { readJSON, saveJSON, decipherAes, cipherAes, detectLocale, userDataPath, globalUserDataPath } = require('./utils')
|
||||
|
||||
const config = {
|
||||
urls: [],
|
||||
@ -13,7 +13,10 @@ const config = {
|
||||
}
|
||||
|
||||
const getLocalConfig = async () => {
|
||||
const localConfig = await readJSON('config.json')
|
||||
let localConfig = await readJSON(userDataPath, 'config.json')
|
||||
if (!localConfig) {
|
||||
localConfig = await readJSON(globalUserDataPath, 'config.json')
|
||||
}
|
||||
if (!localConfig) return
|
||||
const configTemp = {}
|
||||
for (let key in localConfig) {
|
||||
|
Reference in New Issue
Block a user