mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-12-25 03:59:30 +08:00
动态修改主题色功能
This commit is contained in:
@@ -1,10 +1,31 @@
|
||||
import { boot } from 'quasar/wrappers'
|
||||
import {
|
||||
boot
|
||||
} from 'quasar/wrappers'
|
||||
import UTOOLS from "../js/utools.js";
|
||||
import programmings from '../js/programs.js';
|
||||
|
||||
// 配置数据存取
|
||||
let defaultProfile = {
|
||||
commandCardStyle: "normal",
|
||||
primaryColor: "#419488"
|
||||
}
|
||||
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 ({ app }) => {
|
||||
export default boot(async({
|
||||
app
|
||||
}) => {
|
||||
app.config.globalProperties.$utools = UTOOLS
|
||||
app.config.globalProperties.$programmings = programmings
|
||||
})
|
||||
app.config.globalProperties.$profile = defaultProfile
|
||||
})
|
||||
Reference in New Issue
Block a user