From 50a103710db0016c517b918c58e3ce32436753a5 Mon Sep 17 00:00:00 2001 From: V Date: Wed, 16 Aug 2023 02:02:16 +0200 Subject: [PATCH] Add Vesktop section to Settings customSections --- src/renderer/hideGarbage.css | 5 +++++ src/renderer/index.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/renderer/hideGarbage.css b/src/renderer/hideGarbage.css index a820403..cbc1921 100644 --- a/src/renderer/hideGarbage.css +++ b/src/renderer/hideGarbage.css @@ -3,3 +3,8 @@ [class|=listItem]:has(+ [class|=listItem] [data-list-item-id=guildsnav___app-download-button]) { display: none; } + +/* FIXME: Remove after 23/08/23 */ +.vc-desktop-settings { + display: none; +} diff --git a/src/renderer/index.ts b/src/renderer/index.ts index 7817dda..e7871d3 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -14,6 +14,7 @@ export * as Components from "./components"; import { findByPropsLazy } from "@vencord/types/webpack"; import { FluxDispatcher } from "@vencord/types/webpack/common"; +import SettingsUi from "./components/Settings"; import { Settings } from "./settings"; export { Settings }; @@ -35,6 +36,17 @@ export async function openInviteModal(code: string) { return true; } +const customSettingsSections = ( + Vencord.Plugins.plugins.Settings as any as { customSections: ((ID: Record) => any)[] } +).customSections; + +customSettingsSections.push(() => ({ + section: "Vesktop", + label: "Vesktop Settings", + element: SettingsUi, + className: "vc-vesktop-settings" +})); + const arRPC = Vencord.Plugins.plugins["WebRichPresence (arRPC)"]; arRPC.required = !!Settings.store.arRPC;