mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-29 22:39:45 +08:00
♻️ 修改系统设置存储方式
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user