From f50bac6277b3da5817614ef5f71e0c484f357092 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sat, 6 Dec 2025 19:34:36 -0500 Subject: [PATCH] Add Old Settings v1 sections back --- src/equicordplugins/iRememberYou/index.tsx | 22 ++++++++++++++------ src/equicordplugins/iconViewer/index.tsx | 24 +++++++++++++++------- src/equicordplugins/themeLibrary/index.tsx | 22 ++++++++++++++------ 3 files changed, 49 insertions(+), 19 deletions(-) diff --git a/src/equicordplugins/iRememberYou/index.tsx b/src/equicordplugins/iRememberYou/index.tsx index 92f26f485..02851a6e5 100644 --- a/src/equicordplugins/iRememberYou/index.tsx +++ b/src/equicordplugins/iRememberYou/index.tsx @@ -24,14 +24,22 @@ export default definePlugin({ patches: [], async start() { - const customEntriesSections = SettingsPlugin.customEntries; - customEntriesSections.push({ - key: "i_remember_you", + const { customEntries, customSections } = SettingsPlugin; + + customEntries.push({ + key: "equicord_i_remember_you", title: "I Remember You", Component: () => , Icon: EyeIcon }); + customSections.push(() => ({ + section: "EquicordIRememberYou", + label: "IRememberYou", + element: () => , + id: "IRememberYou" + })); + const data = (this.dataManager = await new Data().withStart()); await data.initializeUsersCollection(); @@ -45,9 +53,11 @@ export default definePlugin({ stop() { const dataManager = this.dataManager as Data; - const customEntriesSections = SettingsPlugin.customEntries; - const i = customEntriesSections.findIndex(entry => entry.key === "i_remember_you"); - if (i !== -1) customEntriesSections.splice(i, 1); + const { customEntries, customSections } = SettingsPlugin; + const entry = customEntries.findIndex(entry => entry.key === "equicord_i_remember_you"); + const section = customSections.findIndex(section => section({} as any).id === "IRememberYou"); + if (entry !== -1) customEntries.splice(entry, 1); + if (section !== -1) customSections.splice(section, 1); removeMessagePreSendListener(dataManager._onMessagePreSend_preSend); clearInterval(dataManager._storageAutoSaveProtocol_interval); diff --git a/src/equicordplugins/iconViewer/index.tsx b/src/equicordplugins/iconViewer/index.tsx index 3651d21dc..738d9c248 100644 --- a/src/equicordplugins/iconViewer/index.tsx +++ b/src/equicordplugins/iconViewer/index.tsx @@ -22,23 +22,33 @@ export default definePlugin({ startAt: StartAt.WebpackReady, toolboxActions: { "Open Icons Tab"() { - openUserSettingsPanel("icon_viewer"); + openUserSettingsPanel("equicord_icon_viewer"); }, }, settingsAboutComponent: SettingsAbout, start() { - const customEntriesSections = SettingsPlugin.customEntries; + const { customEntries, customSections } = SettingsPlugin; - customEntriesSections.push({ - key: "icon_viewer", + customEntries.push({ + key: "equicord_icon_viewer", title: "Icon Finder", Component: IconsTab, Icon: MagnifyingGlassIcon }); + + customSections.push(() => ({ + section: "EquicordDiscordIcons", + label: "Icon Finder", + element: IconsTab, + className: "vc-discord-icons", + id: "IconViewer" + })); }, stop() { - const customEntriesSections = SettingsPlugin.customEntries; - const i = customEntriesSections.findIndex(entry => entry.key === "icon_viewer"); - if (i !== -1) customEntriesSections.splice(i, 1); + const { customEntries, customSections } = SettingsPlugin; + const entry = customEntries.findIndex(entry => entry.key === "equicord_icon_viewer"); + const section = customSections.findIndex(section => section({} as any).id === "IconViewer"); + if (entry !== -1) customEntries.splice(entry, 1); + if (section !== -1) customSections.splice(section, 1); }, }); diff --git a/src/equicordplugins/themeLibrary/index.tsx b/src/equicordplugins/themeLibrary/index.tsx index 380ebcc5f..fdf8d81cd 100644 --- a/src/equicordplugins/themeLibrary/index.tsx +++ b/src/equicordplugins/themeLibrary/index.tsx @@ -24,19 +24,29 @@ export default definePlugin({ }, start() { - const customEntriesSections = SettingsPlugin.customEntries; + const { customEntries, customSections } = SettingsPlugin; - customEntriesSections.push({ - key: "theme_library", + customEntries.push({ + key: "equicord_theme_library", title: "Theme Library", Component: require("./components/ThemeTab").default, Icon: ColorPaletteIcon }); + + customSections.push(() => ({ + section: "EquicordThemeLibrary", + label: "Theme Library", + searchableTitles: ["Theme Library"], + element: require("./components/ThemeTab").default, + id: "ThemeLibrary", + })); }, stop() { - const customEntriesSections = SettingsPlugin.customEntries; - const i = customEntriesSections.findIndex(entry => entry.key === "theme_library"); - if (i !== -1) customEntriesSections.splice(i, 1); + const { customEntries, customSections } = SettingsPlugin; + const entry = customEntries.findIndex(entry => entry.key === "equicord_theme_library"); + const section = customSections.findIndex(section => section({} as any).id === "ThemeLibrary"); + if (entry !== -1) customEntries.splice(entry, 1); + if (section !== -1) customSections.splice(section, 1); }, });