From 932457a217049677b58e2e6c3732a4041bf3bed1 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 17 Apr 2026 18:27:29 -0400 Subject: [PATCH] WindowsTitleBar: Fix Not Disabling Discords TitleBar --- .../settings/tabs/vencord/index.tsx | 16 +++++++++++-- src/equicordplugins/equicordHelper/index.tsx | 24 ++++++++++++++++++- 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/components/settings/tabs/vencord/index.tsx b/src/components/settings/tabs/vencord/index.tsx index c2f0aacea..a88d7ca54 100644 --- a/src/components/settings/tabs/vencord/index.tsx +++ b/src/components/settings/tabs/vencord/index.tsx @@ -27,7 +27,7 @@ import { classNameFactory } from "@utils/css"; import { Margins } from "@utils/margins"; import { identity, isAnyPluginDev } from "@utils/misc"; import { relaunch } from "@utils/native"; -import { GuildMemberStore, React, Select, UserStore } from "@webpack/common"; +import { Alerts, GuildMemberStore, React, Select, UserStore } from "@webpack/common"; import { DonateButtonComponent } from "./DonateButton"; import { openNotificationSettingsModal } from "./NotificationSettings"; @@ -249,7 +249,19 @@ function EquicordSettings() { (settings[s.key] = v)} + onChange={v => { + settings[s.key] = v; + + if (s.restartRequired) { + Alerts.show({ + title: "Restart Required", + body: "A restart is required to apply this change", + confirmText: "Restart now", + cancelText: "Later!", + onConfirm: relaunch + }); + } + }} title={s.title} description={ s.warning.enabled ? ( diff --git a/src/equicordplugins/equicordHelper/index.tsx b/src/equicordplugins/equicordHelper/index.tsx index e5a5f5220..81ffe1e1c 100644 --- a/src/equicordplugins/equicordHelper/index.tsx +++ b/src/equicordplugins/equicordHelper/index.tsx @@ -8,7 +8,7 @@ import { ApplicationCommandInputType, sendBotMessage } from "@api/Commands"; import { HeaderBarButton } from "@api/HeaderBar"; import { addMessagePreSendListener, removeMessagePreSendListener } from "@api/MessageEvents"; import { isPluginEnabled } from "@api/PluginManager"; -import { definePluginSettings, migratePluginToSettings } from "@api/Settings"; +import { definePluginSettings, migratePluginToSettings, Settings } from "@api/Settings"; import customRPC from "@plugins/customRPC"; import { Devs, EquicordDevs, GUILD_ID, SUPPORT_CHANNEL_ID, SUPPORT_CHANNEL_IDS, VC_SUPPORT_CHANNEL_IDS } from "@utils/constants"; import { isAnyPluginDev } from "@utils/misc"; @@ -288,6 +288,28 @@ export default definePlugin({ replace: "" }, predicate: () => settings.store.jsonGateway + }, + { + find: ".USE_OSX_NATIVE_TRAFFIC_LIGHTS", + predicate: () => Settings.winNativeTitleBar, + replacement: { + match: /case \i\.\i\.WINDOWS:/, + replace: 'case "WEB":' + }, + }, + { + find: '"refresh-title-bar-small"', + predicate: () => Settings.winNativeTitleBar, + replacement: [ + { + match: /\i===\i\.PlatformTypes\.WINDOWS/g, + replace: "false" + }, + { + match: /\i===\i\.PlatformTypes\.WEB/g, + replace: "true" + } + ] } ], renderMessageAccessory(props) {