Add option to not minimize to tray

This commit is contained in:
Vendicated 2023-04-09 05:57:45 +02:00
parent 94b80ebe75
commit c29dd6d2d7
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
3 changed files with 3 additions and 1 deletions

View file

@ -222,7 +222,7 @@ export function createMainWindow() {
});
win.on("close", e => {
if (isQuitting) return;
if (isQuitting || Settings.minimizeToTray === false) return;
e.preventDefault();
win.hide();

View file

@ -10,6 +10,7 @@ export default function SettingsUi() {
const { Forms: { FormSection, FormText, FormDivider, FormSwitch, FormTitle }, Text, Select, Button } = Common;
const switches: [keyof typeof Settings, string, string, boolean?][] = [
["minimizeToTray", "Minimize to tray", "Hitting X will make Discord minimize to the tray instead of closing", true],
["openLinksWithElectron", "Open Links in app", "Opens links in a new window instead of your WebBrowser"],
["disableMinSize", "Disable minimum window size", "Allows you to resize the window smaller than the default size"],
];

View file

@ -8,4 +8,5 @@ export interface Settings {
openLinksWithElectron?: boolean;
vencordDir?: string;
disableMinSize?: boolean;
minimizeToTray?: boolean;
}