Add Vesktop section to Settings customSections

This commit is contained in:
V 2023-08-16 02:02:16 +02:00
parent e6e66e775c
commit 50a103710d
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
2 changed files with 17 additions and 0 deletions

View file

@ -3,3 +3,8 @@
[class|=listItem]:has(+ [class|=listItem] [data-list-item-id=guildsnav___app-download-button]) { [class|=listItem]:has(+ [class|=listItem] [data-list-item-id=guildsnav___app-download-button]) {
display: none; display: none;
} }
/* FIXME: Remove after 23/08/23 */
.vc-desktop-settings {
display: none;
}

View file

@ -14,6 +14,7 @@ export * as Components from "./components";
import { findByPropsLazy } from "@vencord/types/webpack"; import { findByPropsLazy } from "@vencord/types/webpack";
import { FluxDispatcher } from "@vencord/types/webpack/common"; import { FluxDispatcher } from "@vencord/types/webpack/common";
import SettingsUi from "./components/Settings";
import { Settings } from "./settings"; import { Settings } from "./settings";
export { Settings }; export { Settings };
@ -35,6 +36,17 @@ export async function openInviteModal(code: string) {
return true; return true;
} }
const customSettingsSections = (
Vencord.Plugins.plugins.Settings as any as { customSections: ((ID: Record<string, unknown>) => any)[] }
).customSections;
customSettingsSections.push(() => ({
section: "Vesktop",
label: "Vesktop Settings",
element: SettingsUi,
className: "vc-vesktop-settings"
}));
const arRPC = Vencord.Plugins.plugins["WebRichPresence (arRPC)"]; const arRPC = Vencord.Plugins.plugins["WebRichPresence (arRPC)"];
arRPC.required = !!Settings.store.arRPC; arRPC.required = !!Settings.store.arRPC;