mirror of
https://github.com/earthjasonlin/zzz-signal-search-export.git
synced 2026-10-05 03:00:11 +08:00
feat: save data in the current folder
This commit is contained in:
1 parent
b88b57ae62
commit
3dbb746a38
4 files changed
+47
-25
No files matched your search
+5
-2
@@ -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