mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-15 15:10:31 -08:00
Show context menu when clicking menubar icon by default (#106)
This commit is contained in:
parent
cf4f168946
commit
4de7bbd554
7 changed files with 80 additions and 70 deletions
Binary file not shown.
|
|
@ -34,7 +34,7 @@
|
|||
"fs-extra": "8.1.0",
|
||||
"is-url": "1.2.4",
|
||||
"jimp": "0.6.8",
|
||||
"menubar": "6.0.8",
|
||||
"menubar": "7.1.0",
|
||||
"node-fetch": "2.6.0",
|
||||
"request": "2.88.0",
|
||||
"request-promise-native": "1.0.8",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/node_modules/menubar/lib/Menubar.js b/node_modules/menubar/lib/Menubar.js
|
||||
index 2fc8feb..5a903e0 100644
|
||||
index ee94dbf..63f8dfc 100644
|
||||
--- a/node_modules/menubar/lib/Menubar.js
|
||||
+++ b/node_modules/menubar/lib/Menubar.js
|
||||
@@ -239,7 +239,10 @@ var Menubar = /** @class */ (function (_super) {
|
||||
@@ -237,7 +237,10 @@ var Menubar = /** @class */ (function (_super) {
|
||||
}
|
||||
// `.setPosition` crashed on non-integers
|
||||
// https://github.com/maxogden/menubar/issues/233
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 641 B |
Binary file not shown.
|
Before Width: | Height: | Size: 990 B After Width: | Height: | Size: 1.4 KiB |
|
|
@ -35,6 +35,8 @@ const createAsync = () => {
|
|||
index: REACT_PATH,
|
||||
icon: path.resolve(__dirname, '..', 'menubarTemplate.png'),
|
||||
preloadWindow: true,
|
||||
showOnRightClick: true,
|
||||
tooltip: 'Singlebox',
|
||||
browserWindow: {
|
||||
x: menubarWindowState.x,
|
||||
y: menubarWindowState.y,
|
||||
|
|
@ -62,8 +64,10 @@ const createAsync = () => {
|
|||
});
|
||||
|
||||
mb.on('ready', () => {
|
||||
mb.tray.on('click', () => {
|
||||
const registered = getPreference('registered');
|
||||
const updaterEnabled = process.env.SNAP == null && !process.mas && !process.windowsStore;
|
||||
const updaterEnabled = process.env.SNAP == null
|
||||
&& !process.mas && !process.windowsStore;
|
||||
|
||||
const updaterMenuItem = {
|
||||
label: 'Check for Updates...',
|
||||
|
|
@ -92,6 +96,13 @@ const createAsync = () => {
|
|||
}
|
||||
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'Open Singlebox',
|
||||
click: () => mb.showWindow(),
|
||||
},
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
{
|
||||
label: 'About Singlebox',
|
||||
click: () => ipcMain.emit('request-show-about-window'),
|
||||
|
|
@ -128,7 +139,6 @@ const createAsync = () => {
|
|||
},
|
||||
]);
|
||||
|
||||
mb.tray.on('right-click', () => {
|
||||
mb.tray.popUpContextMenu(contextMenu);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -8568,10 +8568,10 @@ memory-fs@^0.5.0:
|
|||
errno "^0.1.3"
|
||||
readable-stream "^2.0.1"
|
||||
|
||||
menubar@6.0.8:
|
||||
version "6.0.8"
|
||||
resolved "https://registry.yarnpkg.com/menubar/-/menubar-6.0.8.tgz#deff4b4227c73149f6316c481accb1486e7c9e7f"
|
||||
integrity sha512-S02SLiqec8MAUbV2vsUThh0P9XPKS9mrHVN3c/6T1g+tuHwFX7TRup3xCAjIGCO+Hxs32tWmjqVh4KjBGIXudQ==
|
||||
menubar@7.1.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/menubar/-/menubar-7.1.0.tgz#c92d75e78fcce6da39fced936ad75c94009699df"
|
||||
integrity sha512-B7ITYPW0oNu5NSjaYTt9ExL6GRMVb9p+ryW+c/4Rg1/EErmDGJhwCZavnV2roGJApNiFahymHsaG9yRq2iMCkw==
|
||||
dependencies:
|
||||
electron-positioner "^4.1.0"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue