chore: integrate new admin with l-s
This commit is contained in:
parent
6b3db134e7
commit
bf8f1d991c
72 changed files with 1493 additions and 1611 deletions
|
|
@ -42,4 +42,28 @@ function getConfig () {
|
|||
return (state && state.config) || {}
|
||||
}
|
||||
|
||||
module.exports = { getConfig, saveConfig, saveAccounts, getAccounts }
|
||||
function loadLatest () {
|
||||
return new Promise((resolve) => {
|
||||
if (!db) {
|
||||
setTimeout(() => {
|
||||
return resolve(db.getState())
|
||||
}, 1000)
|
||||
} else {
|
||||
return resolve(db.getState())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function load (versionId) {
|
||||
return new Promise((resolve) => {
|
||||
if (!db) {
|
||||
setTimeout(() => {
|
||||
return resolve(db.getState())
|
||||
}, 1000)
|
||||
} else {
|
||||
return resolve(db.getState())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = { getConfig, saveConfig, saveAccounts, getAccounts, loadLatest, load }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue