Improve settings default handling

This commit is contained in:
Vendicated
2026-08-24 14:40:50 +02:00
parent 09ce424b30
commit fd7ada3cd8
14 changed files with 123 additions and 78 deletions
+33
View File
@@ -0,0 +1,33 @@
/*
* Vesktop, a desktop app aiming to give you a snappier Discord Experience
* Copyright (c) 2026 Vendicated and Vesktop contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { Settings } from "./settings";
export const DefaultVesktopSettings: Settings = {
discordBranch: "stable",
hardwareAcceleration: true,
hardwareVideoAcceleration: false,
nativeTitleBar: false,
staticTitle: false,
enableMenu: false,
enableShadow: true,
enableRoundedCorners: true,
enableSplashScreen: true,
splashTheming: true,
tray: true,
minimizeToTray: true,
clickTrayToShowHide: false,
disableMinSize: false,
disableSmoothScroll: false,
enableTaskbarFlashing: false,
arRPC: true,
openLinksWithElectron: false,
autoStartMinimized: false,
splashPixelated: false,
webRTCIPHandlingPolicy: "default",
appBadge: true,
transparencyOption: "none"
};
+23 -23
View File
@@ -7,36 +7,36 @@
import type { Rectangle } from "electron";
export interface Settings {
discordBranch?: "stable" | "canary" | "ptb";
transparencyOption?: "none" | "mica" | "tabbed" | "acrylic";
webRTCIPHandlingPolicy?:
discordBranch: "stable" | "canary" | "ptb";
transparencyOption: "none" | "mica" | "tabbed" | "acrylic";
webRTCIPHandlingPolicy:
| "default"
| "default_public_interface_only"
| "default_public_and_private_interfaces"
| "disable_non_proxied_udp";
tray?: boolean;
minimizeToTray?: boolean;
autoStartMinimized?: boolean;
openLinksWithElectron?: boolean;
staticTitle?: boolean;
enableMenu?: boolean;
enableShadow?: boolean;
enableRoundedCorners?: boolean;
disableSmoothScroll?: boolean;
hardwareAcceleration?: boolean;
hardwareVideoAcceleration?: boolean;
arRPC?: boolean;
appBadge?: boolean;
enableTaskbarFlashing?: boolean;
disableMinSize?: boolean;
clickTrayToShowHide?: boolean;
nativeTitleBar?: boolean;
tray: boolean;
minimizeToTray: boolean;
autoStartMinimized: boolean;
openLinksWithElectron: boolean;
staticTitle: boolean;
enableMenu: boolean;
enableShadow: boolean;
enableRoundedCorners: boolean;
disableSmoothScroll: boolean;
hardwareAcceleration: boolean;
hardwareVideoAcceleration: boolean;
arRPC: boolean;
appBadge: boolean;
enableTaskbarFlashing: boolean;
disableMinSize: boolean;
clickTrayToShowHide: boolean;
nativeTitleBar: boolean;
enableSplashScreen?: boolean;
splashTheming?: boolean;
enableSplashScreen: boolean;
splashTheming: boolean;
splashPixelated: boolean;
splashColor?: string;
splashBackground?: string;
splashPixelated?: boolean;
spellCheckLanguages?: string[];