Merge branch 'main' into global-shortcuts

# Conflicts:
#	src/renderer/components/settings/Settings.tsx
This commit is contained in:
agent
2026-09-11 11:38:04 +02:00
42 changed files with 1113 additions and 968 deletions
+32 -37
View File
@@ -11,8 +11,8 @@ import { BaseText, Divider, ErrorBoundary } from "@vencord/types/components";
import { ComponentType } from "react";
import { WebRTCIPHandlingPolicyPicker } from "renderer/components/settings/WebRTCIPHandlingPolicyPicker";
import { KeybindsButton } from "renderer/globalShortcuts/ShortcutSettings";
import { Settings, useSettings } from "renderer/settings";
import { isMac, isWindows } from "renderer/utils";
import { getValueAndOnChange, Settings, useSettings } from "renderer/settings";
import { isMac } from "renderer/utils";
import { AutoStartToggle } from "./AutoStartToggle";
import { DeveloperOptionsButton } from "./DeveloperOptions";
@@ -27,7 +27,6 @@ interface BooleanSetting {
key: keyof typeof Settings.store;
title: string;
description: string;
defaultValue: boolean;
disabled?(): boolean;
invisible?(): boolean;
}
@@ -43,50 +42,55 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
{
key: "hardwareAcceleration",
title: "Hardware Acceleration",
description: "Enable hardware acceleration",
defaultValue: true
description: "Enable hardware acceleration"
},
{
key: "hardwareVideoAcceleration",
title: "Video Hardware Acceleration",
description:
"Enable hardware video acceleration. This can improve performance of screenshare and video playback, but may cause graphical glitches and infinitely loading streams.",
defaultValue: false,
disabled: () => Settings.store.hardwareAcceleration === false
disabled: () => !Settings.store.hardwareAcceleration
}
],
"User Interface": [
{
key: "customTitleBar",
title: "Discord Titlebar",
description: "Use Discord's custom title bar instead of the native system one. Requires a full restart.",
defaultValue: isWindows
key: "nativeTitleBar",
title: "Native Titlebar",
description: "Enable the system titlebar in addition to Discord's custom one. Requires a full restart."
},
{
key: "staticTitle",
title: "Static Title",
description: 'Makes the window title "Vesktop" instead of changing to the current page',
defaultValue: false
description: 'Makes the window title "Vesktop" instead of changing to the current page'
},
{
key: "enableMenu",
title: "Enable Menu Bar",
description: "Enables the application menu bar. Press ALT to toggle visibility.",
defaultValue: false,
disabled: () => Settings.store.customTitleBar ?? isWindows
disabled: () => !Settings.store.nativeTitleBar
},
{
key: "enableShadow",
title: "Enable Window Shadow",
description: "Enables the window shadow. Requires a full restart.",
disabled: () => Settings.store.nativeTitleBar
},
{
key: "enableRoundedCorners",
title: "Enable Rounded Corners",
description: "Enables rounded corners. Requires a full restart.",
disabled: () => Settings.store.nativeTitleBar
},
{
key: "enableSplashScreen",
title: "Enable Splash Screen",
description:
"Shows a small splash screen while Vesktop is loading. Disabling this option will show the main window earlier while it's still loading.",
defaultValue: true
"Shows a small splash screen while Vesktop is loading. Disabling this option will show the main window earlier while it's still loading."
},
{
key: "splashTheming",
title: "Splash theming",
description: "Adapt the splash window colors to your custom theme",
defaultValue: true
description: "Adapt the splash window colors to your custom theme"
},
WindowsTransparencyControls,
UserAssetsButton
@@ -96,34 +100,29 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
key: "tray",
title: "Tray Icon",
description: "Add a tray icon for Vesktop",
defaultValue: true,
invisible: () => isMac
},
{
key: "minimizeToTray",
title: "Minimize to tray",
description: "Hitting X will make Vesktop minimize to the tray instead of closing",
defaultValue: true,
invisible: () => isMac,
disabled: () => Settings.store.tray === false
disabled: () => !Settings.store.tray
},
{
key: "clickTrayToShowHide",
title: "Hide/Show on tray click",
description: "Left clicking tray icon will toggle the vesktop window visibility.",
defaultValue: false
description: "Left clicking tray icon will toggle the vesktop window visibility."
},
{
key: "disableMinSize",
title: "Disable minimum window size",
description: "Allows you to make the window as small as your heart desires",
defaultValue: false
description: "Allows you to make the window as small as your heart desires"
},
{
key: "disableSmoothScroll",
title: "Disable smooth scrolling",
description: "Disables smooth scrolling",
defaultValue: false
description: "Disables smooth scrolling"
},
KeybindsButton
],
@@ -132,23 +131,20 @@ const SettingsOptions: Record<string, Array<BooleanSetting | SettingsComponent>>
{
key: "enableTaskbarFlashing",
title: "Enable Taskbar Flashing",
description: "Flashes the app in your taskbar when you have new notifications.",
defaultValue: false
description: "Flashes the app in your taskbar when you have new notifications."
}
],
Miscellaneous: [
{
key: "arRPC",
title: "Rich Presence",
description: "Enables Rich Presence via arRPC",
defaultValue: false
description: "Enables Rich Presence via arRPC"
},
{
key: "openLinksWithElectron",
title: "Open Links in app (experimental)",
description: "Opens links in a new Vesktop window instead of your web browser",
defaultValue: false
description: "Opens links in a new Vesktop window instead of your web browser"
},
WebRTCIPHandlingPolicyPicker
@@ -170,16 +166,15 @@ function SettingsSections() {
{settings.map((Setting, i) => {
if (typeof Setting === "function") return <Setting key={`Custom-${i}`} settings={Settings} />;
const { defaultValue, title, description, key, disabled, invisible } = Setting;
const { title, description, key, disabled, invisible } = Setting;
if (invisible?.()) return null;
return (
<VesktopSettingsSwitch
title={title}
description={description}
value={Settings[key as any] ?? defaultValue}
onChange={v => (Settings[key as any] = v)}
disabled={disabled?.()}
{...getValueAndOnChange(key)}
key={key}
/>
);