-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3758874
commit cb8242c
Showing
8 changed files
with
82 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// import path from 'node:path' | ||
// import fs from 'node:fs' | ||
// import { Conf } from 'electron-conf/main' | ||
// import { app } from 'electron' | ||
// import defaultConfigForAnyPlatform from '../const/defaultConfig' | ||
|
||
// const schema = { | ||
// type: 'object', | ||
// properties: { | ||
// version: { | ||
// type: 'number', | ||
// nullable: true, | ||
// }, | ||
// common: { | ||
// type: 'object', | ||
// properties: { | ||
// autoLaunch: { | ||
// type: 'boolean', | ||
// default: false, | ||
// }, | ||
// keepWindowSize: { | ||
// type: 'boolean', | ||
// default: false, | ||
// }, | ||
// lang: { | ||
// type: 'string', | ||
// default: 'zh-CN', | ||
// }, | ||
// theme: { | ||
// type: 'string', | ||
// default: 'light', | ||
// }, | ||
// }, | ||
// }, | ||
// actions: { | ||
// type: 'object', | ||
// properties: {}, | ||
// }, | ||
// data: { | ||
// type: 'object', | ||
// properties: {}, | ||
// }, | ||
// }, | ||
// } | ||
|
||
// const configPath = path.join(app.getPath('userData'), 'config.json') | ||
// const cofigObj = fs.readFileSync(configPath, 'utf-8') | ||
// export function initConfig() { | ||
// const conf = new Conf({ schema }) | ||
|
||
// if (!fs.existsSync(configPath) || conf.store.size === 0 || !conf.has('version')) { | ||
// // 如果文件不存在或conf实例为空,则设置默认配置 | ||
// conf.set(defaultConfigForAnyPlatform) | ||
// } | ||
// conf.registerRendererListener() | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters