feat: add dialog to manage data

This commit is contained in:
mio
2023-05-26 16:10:33 +08:00
parent 38cb320628
commit 839b8fd54a
7 changed files with 107 additions and 10 deletions

View File

@ -72,6 +72,14 @@ const readData = async () => {
}
}
const deleteData = async (uid, action) => {
const data = dataMap.get(uid)
if (data) {
data.deleted = action
await saveData(data)
}
}
const changeCurrent = async (uid) => {
config.current = uid
await config.save()
@ -513,3 +521,4 @@ exports.getData = () => {
}
exports.getUrl = getUrl
exports.deleteData = deleteData