♻️ 修改系统设置存储方式

This commit is contained in:
muwoo
2023-08-22 17:41:51 +08:00
parent d2d94c13b7
commit f4f91e1639
24 changed files with 202 additions and 110 deletions

View File

@@ -2,7 +2,6 @@ import { dialog, Menu, Tray, app, shell, BrowserWindow } from 'electron';
import path from 'path';
import pkg from '../../../package.json';
import os from 'os';
import API from '../common/api';
import commonConst from '@/common/utils/commonConst';
import { guide } from '../browsers';
@@ -21,11 +20,6 @@ function createTray(window: BrowserWindow): Promise<Tray> {
}
const appIcon = new Tray(path.join(__static, icon));
const getShowAndHiddenHotKey = (): string => {
const config = global.OP_CONFIG.get();
return config.perf.shortCut.showAndHidden;
};
const openSettings = () => {
window.webContents.executeJavaScript(
`window.rubick && window.rubick.openMenu && window.rubick.openMenu({ code: "settings" })`
@@ -59,8 +53,7 @@ function createTray(window: BrowserWindow): Promise<Tray> {
},
{ type: 'separator' },
{
label: '显示窗口',
accelerator: getShowAndHiddenHotKey(),
label: '显示',
click() {
window.show();
},