mirror of
https://github.com/rubickCenter/rubick
synced 2026-03-06 13:53:40 +08:00
✨ 增加用户体系
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import commonConst from '@/common/utils/commonConst';
|
||||
|
||||
export default {
|
||||
version: 5,
|
||||
version: 9,
|
||||
perf: {
|
||||
custom: {
|
||||
primaryColor: '#106898',
|
||||
errorColor: '#ed6d46',
|
||||
warningColor: '#e5a84b',
|
||||
successColor: '#c0d695',
|
||||
infoColor: '#007175',
|
||||
logo: `file://${__static}/logo.png`,
|
||||
placeholder: '你好 rubick',
|
||||
},
|
||||
shortCut: {
|
||||
showAndHidden: 'Option+R',
|
||||
separate: 'Ctrl+D',
|
||||
@@ -12,8 +19,7 @@ export default {
|
||||
common: {
|
||||
start: true,
|
||||
space: true,
|
||||
// 是否失焦隐藏。默认在dev环境不隐藏,在打包后隐藏。
|
||||
hideOnBlur: commonConst.production(),
|
||||
hideOnBlur: true,
|
||||
autoPast: false,
|
||||
darkMode: false,
|
||||
},
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
import path from "path";
|
||||
import fs from "fs";
|
||||
import getLocalDataFile from "./getLocalDataFile";
|
||||
import defaultConfigForAnyPlatform from "../constans/defaultConfig";
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import getLocalDataFile from './getLocalDataFile';
|
||||
import defaultConfigForAnyPlatform from '../constans/defaultConfig';
|
||||
|
||||
const configPath = path.join(getLocalDataFile(), "./rubick-config.json");
|
||||
const configPath = path.join(getLocalDataFile(), './rubick-config.json');
|
||||
|
||||
global.OP_CONFIG = {
|
||||
config: null,
|
||||
getDefaultConfig() {
|
||||
return defaultConfigForAnyPlatform;
|
||||
},
|
||||
get() {
|
||||
try {
|
||||
if (!global.OP_CONFIG.config) {
|
||||
global.OP_CONFIG.config = JSON.parse(
|
||||
fs.readFileSync(configPath, "utf8") ||
|
||||
fs.readFileSync(configPath, 'utf8') ||
|
||||
JSON.stringify(defaultConfigForAnyPlatform)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user