mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-29 22:39:45 +08:00
chore: API改为类,成员函数变量增加static关键字 & yarn lint
This commit is contained in:
@@ -22,56 +22,57 @@ function createTray(window: BrowserWindow): Promise<Tray> {
|
||||
const getShowAndHiddenHotKey = (): string => {
|
||||
const config = global.OP_CONFIG.get();
|
||||
return config.perf.shortCut.showAndHidden;
|
||||
}
|
||||
};
|
||||
|
||||
const createContextMenu = () => Menu.buildFromTemplate([
|
||||
{
|
||||
label: "帮助文档",
|
||||
click: () => {
|
||||
process.nextTick(() => {
|
||||
shell.openExternal("https://github.com/clouDr-f2e/rubick");
|
||||
});
|
||||
const createContextMenu = () =>
|
||||
Menu.buildFromTemplate([
|
||||
{
|
||||
label: "帮助文档",
|
||||
click: () => {
|
||||
process.nextTick(() => {
|
||||
shell.openExternal("https://github.com/clouDr-f2e/rubick");
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "意见反馈",
|
||||
click: () => {
|
||||
process.nextTick(() => {
|
||||
shell.openExternal("https://github.com/clouDr-f2e/rubick/issues");
|
||||
});
|
||||
{
|
||||
label: "意见反馈",
|
||||
click: () => {
|
||||
process.nextTick(() => {
|
||||
shell.openExternal("https://github.com/clouDr-f2e/rubick/issues");
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "显示窗口",
|
||||
accelerator: getShowAndHiddenHotKey(),
|
||||
click() {
|
||||
window.show();
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "显示窗口",
|
||||
accelerator: getShowAndHiddenHotKey(),
|
||||
click() {
|
||||
window.show();
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
role: "quit",
|
||||
label: "退出",
|
||||
},
|
||||
{
|
||||
label: "重启",
|
||||
click() {
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
{
|
||||
role: "quit",
|
||||
label: "退出",
|
||||
},
|
||||
},
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "关于",
|
||||
click() {
|
||||
dialog.showMessageBox({
|
||||
title: "拉比克",
|
||||
message: "极简、插件化的现代桌面软件",
|
||||
detail: `Version: ${pkg.version}\nAuthor: muwoo`,
|
||||
});
|
||||
{
|
||||
label: "重启",
|
||||
click() {
|
||||
app.relaunch();
|
||||
app.quit();
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
{ type: "separator" },
|
||||
{
|
||||
label: "关于",
|
||||
click() {
|
||||
dialog.showMessageBox({
|
||||
title: "拉比克",
|
||||
message: "极简、插件化的现代桌面软件",
|
||||
detail: `Version: ${pkg.version}\nAuthor: muwoo`,
|
||||
});
|
||||
},
|
||||
},
|
||||
]);
|
||||
appIcon.on("click", () => {
|
||||
appIcon.setContextMenu(createContextMenu());
|
||||
appIcon.popUpContextMenu();
|
||||
|
||||
Reference in New Issue
Block a user