数据存储结构调整

This commit is contained in:
fofolee
2022-04-09 01:21:39 +08:00
parent 431906a1bb
commit 1d63940749
5 changed files with 25 additions and 37 deletions

View File

@@ -10,24 +10,19 @@ let defaultProfile = {
primaryColor: "#009688",
defaultPrimaryColor: "#009688",
backgroundImg: null,
codeHistory: {}
}
let userProfile = UTOOLS.getDB(
UTOOLS.DBPRE.CFG + "preferences"
);
Object.assign(defaultProfile, userProfile)
utools.onPluginOut(() => {
UTOOLS.putDB(
defaultProfile,
UTOOLS.DBPRE.CFG + "preferences"
);
});
// "async" is optional;
// more info on params: https://v2.quasar.dev/quasar-cli/boot-files
export default boot(async ({
export default boot(async({
app
}) => {
app.config.globalProperties.$utools = UTOOLS
app.config.globalProperties.$programmings = programmings
app.config.globalProperties.$profile = defaultProfile
})
})