mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-03 19:54:44 -07:00
fixes, the tray icon can't be removed on wayland so don't even try
This commit is contained in:
parent
0f214bdbe2
commit
e8c1189304
4 changed files with 14 additions and 37 deletions
|
|
@ -57,7 +57,7 @@
|
||||||
"eslint-plugin-react-hooks": "^5.2.0",
|
"eslint-plugin-react-hooks": "^5.2.0",
|
||||||
"eslint-plugin-sonarjs": "^3.0.5",
|
"eslint-plugin-sonarjs": "^3.0.5",
|
||||||
"globals": "^16.4.0",
|
"globals": "^16.4.0",
|
||||||
"jiti": "^2.6.0",
|
"jiti": "^2.6.1",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
"rollup-plugin-visualizer": "^6.0.3",
|
"rollup-plugin-visualizer": "^6.0.3",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ export function updateTrayState(state: {
|
||||||
if (state.monitoringEnabled !== undefined) {
|
if (state.monitoringEnabled !== undefined) {
|
||||||
appState.monitoringEnabled = state.monitoringEnabled;
|
appState.monitoringEnabled = state.monitoringEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTrayMenu();
|
updateTrayMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -179,14 +180,7 @@ function buildContextMenu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createTray() {
|
export function createTray() {
|
||||||
const isEnabled = getEnableSystemTray();
|
if (!getEnableSystemTray() || tray) {
|
||||||
|
|
||||||
if (!isEnabled) {
|
|
||||||
destroyTray();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tray) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -232,13 +226,6 @@ export function createTray() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function destroyTray() {
|
|
||||||
if (tray) {
|
|
||||||
tray.destroy();
|
|
||||||
tray = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function updateTrayMenu() {
|
export function updateTrayMenu() {
|
||||||
if (tray) {
|
if (tray) {
|
||||||
tray.setContextMenu(buildContextMenu());
|
tray.setContextMenu(buildContextMenu());
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { isDevelopment } from '@/utils/node/environment';
|
||||||
import {
|
import {
|
||||||
getBackgroundColor,
|
getBackgroundColor,
|
||||||
getWindowBounds,
|
getWindowBounds,
|
||||||
setWindowBounds,
|
set as setConfig,
|
||||||
WindowBounds,
|
WindowBounds,
|
||||||
getEnableSystemTray,
|
getEnableSystemTray,
|
||||||
} from './config';
|
} from './config';
|
||||||
|
|
@ -94,10 +94,9 @@ export function createMainWindow() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
setWindowBounds(bounds);
|
setConfig('windowBounds', bounds);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
mainWindow.on('maximize', () => {
|
mainWindow.on('maximize', () => {
|
||||||
sendToRenderer('window-maximized');
|
sendToRenderer('window-maximized');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
27
yarn.lock
27
yarn.lock
|
|
@ -1429,12 +1429,12 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:*":
|
"@types/node@npm:*, @types/node@npm:^24.6.1":
|
||||||
version: 24.6.0
|
version: 24.6.1
|
||||||
resolution: "@types/node@npm:24.6.0"
|
resolution: "@types/node@npm:24.6.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: "npm:~7.13.0"
|
undici-types: "npm:~7.13.0"
|
||||||
checksum: 10c0/06f1aa1b5d9a8c26285b34c25aee554f31a1dc0b39627cc14e7c1c6967e75a47ab9f409eee14796cbcc004ae4059fa884cb6092ecfb368c9656d16686d7cc9d8
|
checksum: 10c0/f2f8aea441d72139345cfa2e392af51bc27d12eb5f74b9b4d202046a2e82ab70d6da89c46a2ac7feea98854c2919e53070869d4af9d448e173a77249fcb7bca3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|
@ -1447,15 +1447,6 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:^24.6.1":
|
|
||||||
version: 24.6.1
|
|
||||||
resolution: "@types/node@npm:24.6.1"
|
|
||||||
dependencies:
|
|
||||||
undici-types: "npm:~7.13.0"
|
|
||||||
checksum: 10c0/f2f8aea441d72139345cfa2e392af51bc27d12eb5f74b9b4d202046a2e82ab70d6da89c46a2ac7feea98854c2919e53070869d4af9d448e173a77249fcb7bca3
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"@types/plist@npm:^3.0.1":
|
"@types/plist@npm:^3.0.1":
|
||||||
version: 3.0.5
|
version: 3.0.5
|
||||||
resolution: "@types/plist@npm:3.0.5"
|
resolution: "@types/plist@npm:3.0.5"
|
||||||
|
|
@ -3895,7 +3886,7 @@ __metadata:
|
||||||
eslint-plugin-sonarjs: "npm:^3.0.5"
|
eslint-plugin-sonarjs: "npm:^3.0.5"
|
||||||
execa: "npm:^9.6.0"
|
execa: "npm:^9.6.0"
|
||||||
globals: "npm:^16.4.0"
|
globals: "npm:^16.4.0"
|
||||||
jiti: "npm:^2.6.0"
|
jiti: "npm:^2.6.1"
|
||||||
lucide-react: "npm:^0.544.0"
|
lucide-react: "npm:^0.544.0"
|
||||||
prettier: "npm:^3.6.2"
|
prettier: "npm:^3.6.2"
|
||||||
react: "npm:^19.1.1"
|
react: "npm:^19.1.1"
|
||||||
|
|
@ -4750,12 +4741,12 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"jiti@npm:^2.4.2, jiti@npm:^2.6.0":
|
"jiti@npm:^2.4.2, jiti@npm:^2.6.1":
|
||||||
version: 2.6.0
|
version: 2.6.1
|
||||||
resolution: "jiti@npm:2.6.0"
|
resolution: "jiti@npm:2.6.1"
|
||||||
bin:
|
bin:
|
||||||
jiti: lib/jiti-cli.mjs
|
jiti: lib/jiti-cli.mjs
|
||||||
checksum: 10c0/5002ccecdb02e85413e5bfe3819a5ac458dcce12b358c556b6cf17b5b6cbedd36514f6a67d4aa2b290caa2b933406502a1985d0bfee784ece788e90a0392d534
|
checksum: 10c0/79b2e96a8e623f66c1b703b98ec1b8be4500e1d217e09b09e343471bbb9c105381b83edbb979d01cef18318cc45ce6e153571b6c83122170eefa531c64b6789b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue