Merge branch 'main' into zoom-parity
This commit is contained in:
commit
9f9038cfd2
5 changed files with 21 additions and 11 deletions
|
@ -27,7 +27,7 @@
|
|||
"arrpc": "github:OpenAsar/arrpc#98879cae0565e6fce34e4cb6f544bf42c6a7e7c8"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@vencord/venmic": "^3.3.2"
|
||||
"@vencord/venmic": "^3.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||
|
|
|
@ -11,8 +11,8 @@ dependencies:
|
|||
|
||||
optionalDependencies:
|
||||
'@vencord/venmic':
|
||||
specifier: ^3.3.2
|
||||
version: 3.3.2
|
||||
specifier: ^3.3.3
|
||||
version: 3.3.3
|
||||
|
||||
devDependencies:
|
||||
'@fal-works/esbuild-plugin-global-externals':
|
||||
|
@ -1000,14 +1000,14 @@ packages:
|
|||
type-fest: 3.13.1
|
||||
dev: true
|
||||
|
||||
/@vencord/venmic@3.3.2:
|
||||
resolution: {integrity: sha512-fwGr5v+Xe4EisKxxhTDlUDamBGlBzSK3+yYZH/7d9ui1j8Q78wCbE1iP8MnDjBvV2kIKn/xV/84wjt9iQvDkFw==}
|
||||
/@vencord/venmic@3.3.3:
|
||||
resolution: {integrity: sha512-qC3fPAUtw8j5L6uV3m9BGEnKpuOAlrYeZzFgILF3bFnDNFE9ANJsYttoHt80laBU7C1Xo56tHG2vVpLBsH+sgw==}
|
||||
engines: {node: '>=14.15'}
|
||||
os: [linux]
|
||||
requiresBuild: true
|
||||
dependencies:
|
||||
cmake-js: 7.3.0
|
||||
node-addon-api: 7.1.0
|
||||
node-addon-api: 8.0.0
|
||||
pkg-prebuilds: 0.2.1
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -3581,9 +3581,9 @@ packages:
|
|||
dev: true
|
||||
optional: true
|
||||
|
||||
/node-addon-api@7.1.0:
|
||||
resolution: {integrity: sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==}
|
||||
engines: {node: ^16 || ^18 || >= 20}
|
||||
/node-addon-api@8.0.0:
|
||||
resolution: {integrity: sha512-ipO7rsHEBqa9STO5C5T10fj732ml+5kLN1cAG8/jdHd56ldQeGj3Q7+scUS+VHK/qy1zLEwC4wMK5+yM0btPvw==}
|
||||
engines: {node: ^18 || ^20 || >= 21}
|
||||
requiresBuild: true
|
||||
dev: false
|
||||
optional: true
|
||||
|
|
|
@ -74,6 +74,10 @@ const [addSettingsListener, removeSettingsListeners] = makeSettingsListenerHelpe
|
|||
const [addVencordSettingsListener, removeVencordSettingsListeners] = makeSettingsListenerHelpers(VencordSettings);
|
||||
|
||||
function initTray(win: BrowserWindow) {
|
||||
const onTrayClick = () => {
|
||||
if (Settings.store.clickTrayToShowHide && win.isVisible()) win.hide();
|
||||
else win.show();
|
||||
};
|
||||
const trayMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: "Open",
|
||||
|
@ -121,7 +125,7 @@ function initTray(win: BrowserWindow) {
|
|||
tray = new Tray(ICON_PATH);
|
||||
tray.setToolTip("Vesktop");
|
||||
tray.setContextMenu(trayMenu);
|
||||
tray.on("click", () => win.show());
|
||||
tray.on("click", onTrayClick);
|
||||
}
|
||||
|
||||
async function clearData(win: BrowserWindow) {
|
||||
|
|
|
@ -85,6 +85,12 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
|
|||
invisible: () => isMac,
|
||||
disabled: () => Settings.store.tray === false
|
||||
},
|
||||
{
|
||||
key: "clickTrayToShowHide",
|
||||
title: "Hide/Show on tray click",
|
||||
description: "Left clicking tray icon will toggle the vesktop window visibility.",
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
key: "disableMinSize",
|
||||
title: "Disable minimum window size",
|
||||
|
|
2
src/shared/settings.d.ts
vendored
2
src/shared/settings.d.ts
vendored
|
@ -21,7 +21,7 @@ export interface Settings {
|
|||
appBadge?: boolean;
|
||||
disableMinSize?: boolean;
|
||||
zoomFactor?: number;
|
||||
|
||||
clickTrayToShowHide?: boolean;
|
||||
/** @deprecated use customTitleBar */
|
||||
discordWindowsTitleBar?: boolean;
|
||||
customTitleBar?: boolean;
|
||||
|
|
Loading…
Reference in a new issue