aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAAGaming <aagaming00@protonmail.com>2023-06-11 17:11:56 -0400
committerGitHub <noreply@github.com>2023-06-11 23:11:56 +0200
commita4191c9f6c8d1d856935364ea3147c65c1dfe852 (patch)
tree7cdc9682e5a898a6e8a6c5de30b346b1eba59cc7
parentf1349a27874cb7576455af38165abfea91a565a7 (diff)
downloadVencord-a4191c9f6c8d1d856935364ea3147c65c1dfe852.tar.gz
Vencord-a4191c9f6c8d1d856935364ea3147c65c1dfe852.tar.bz2
Vencord-a4191c9f6c8d1d856935364ea3147c65c1dfe852.zip
Settings: add custom sections support (#1270)
Co-authored-by: V <vendicated@riseup.net>
-rw-r--r--src/plugins/settings.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/settings.tsx b/src/plugins/settings.tsx
index 2201ece..3ea5a43 100644
--- a/src/plugins/settings.tsx
+++ b/src/plugins/settings.tsx
@@ -82,6 +82,8 @@ export default definePlugin({
}
}],
+ customSections: [] as ((ID: Record<string, unknown>) => any)[],
+
makeSettingsCategories({ ID }: { ID: Record<string, unknown>; }) {
return [
{
@@ -123,11 +125,13 @@ export default definePlugin({
label: "Patch Helper",
element: require("@components/VencordSettings/PatchHelperTab").default,
},
+ // TODO: make this use customSections
IS_VENCORD_DESKTOP && {
section: "VencordDesktop",
label: "Desktop Settings",
element: VencordDesktop.Components.Settings,
},
+ ...this.customSections.map(func => func(ID)),
{
section: ID.DIVIDER
}