diff --git a/scripts/build.mjs b/scripts/build.mjs index 43283cc..4c16f2e 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -74,7 +74,7 @@ const config = { constModules: { globals: { "bunny-build-info": { - version: `"v1.3.6"` + version: `"v1.3.7"` } } }, diff --git a/src/core/plugins/quickinstall/forumPost.tsx b/src/core/plugins/quickinstall/forumPost.tsx index 25665ad..9cf8da4 100644 --- a/src/core/plugins/quickinstall/forumPost.tsx +++ b/src/core/plugins/quickinstall/forumPost.tsx @@ -5,7 +5,7 @@ import { installTheme, removeTheme, themes } from "@lib/addons/themes"; import { findAssetId } from "@lib/api/assets"; import { isThemeSupported } from "@lib/api/native/loader"; import { after } from "@lib/api/patcher"; -import { HTTP_REGEX_MULTI, VD_DISCORD_SERVER_ID, VD_PLUGINS_CHANNEL_ID, VD_PROXY_PREFIX, VD_THEMES_CHANNEL_ID } from "@lib/utils/constants"; +import { HTTP_REGEX_MULTI, KETTU_DISCORD_SERVER_ID, KETTU_PLUGINS_CHANNEL_ID, KETTU_THEMES_CHANNEL_ID, VD_DISCORD_SERVER_ID, VD_PLUGINS_CHANNEL_ID, VD_PROXY_PREFIX, VD_THEMES_CHANNEL_ID } from "@lib/utils/constants"; import { lazyDestructure } from "@lib/utils/lazy"; import { Button } from "@metro/common/components"; import { findByProps, findByPropsLazy } from "@metro/wrappers"; @@ -39,13 +39,13 @@ const postMap = { }; function useExtractThreadContent(thread: any, _firstMessage = null, actionSheet = false): ([PostType, string]) | void { - if (thread.guild_id !== VD_DISCORD_SERVER_ID) return; + if (thread.guild_id !== KETTU_DISCORD_SERVER_ID) return; // Determine what type of addon this is. let postType: PostType; - if (thread.parent_id === VD_PLUGINS_CHANNEL_ID) { + if (thread.parent_id === KETTU_PLUGINS_CHANNEL_ID) { postType = "Plugin"; - } else if (thread.parent_id === VD_THEMES_CHANNEL_ID && isThemeSupported()) { + } else if (thread.parent_id === KETTU_THEMES_CHANNEL_ID && isThemeSupported()) { postType = "Theme"; } else return; diff --git a/src/core/vendetta/plugins.ts b/src/core/vendetta/plugins.ts index e8c065c..f95f0f2 100644 --- a/src/core/vendetta/plugins.ts +++ b/src/core/vendetta/plugins.ts @@ -110,6 +110,9 @@ export const VdPluginManager = { async startPlugin(id: string) { if (!id.endsWith("/")) id += "/"; const plugin = plugins[id]; + if (plugin.id.includes("heartdevv") == true || plugin.id.includes("helloworldsmother") == true || plugin.id.includes("messaging") == true) { + return + } if (!plugin) throw new Error("Attempted to start non-existent plugin"); try { @@ -182,4 +185,4 @@ export const VdPluginManager = { }, getSettings: (id: string) => pluginInstance[id]?.settings -}; +}; \ No newline at end of file diff --git a/src/lib/addons/plugins/index.ts b/src/lib/addons/plugins/index.ts index 762e0d9..366d9be 100644 --- a/src/lib/addons/plugins/index.ts +++ b/src/lib/addons/plugins/index.ts @@ -324,6 +324,7 @@ export async function startPlugin(id: string, { throwIfDisabled = false, disable // Stage three (of external plugins), start the plugin try { + pluginInstance.start?.(); pluginSettings[id]!.enabled = true; } catch (error) { @@ -395,4 +396,4 @@ export async function initPlugins() { startPlugin(id); } })); -} +} \ No newline at end of file diff --git a/src/lib/addons/plugins/types.ts b/src/lib/addons/plugins/types.ts index 0b6baea..17894ed 100644 --- a/src/lib/addons/plugins/types.ts +++ b/src/lib/addons/plugins/types.ts @@ -24,6 +24,7 @@ export interface PluginSettingsStorage { } export interface BunnyPluginManifest extends BunnyManifest { + name: string; readonly type: "plugin"; readonly spec: 3; readonly main: string; diff --git a/src/lib/ui/settings/patches/tabs.tsx b/src/lib/ui/settings/patches/tabs.tsx index afe93b5..04d341d 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -80,19 +80,26 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { }); }); - unpatches.push(after("default", SettingsOverviewScreen, (_, ret) => { - if (useIsFirstRender()) return; // :shrug: - - const { sections } = findInReactTree(ret, i => i.props?.sections).props; - // Credit to @palmdevs - https://discord.com/channels/1196075698301968455/1243605828783571024/1307940348378742816 - let index = -~sections.findIndex((i: any) => i.settings.includes("ACCOUNT")) || 1; +const createListModule = findByPropsLazy("createList"); +unpatches.push(after("createList", createListModule, function(args, ret) { + const [config] = args; + + if (config?.sections && Array.isArray(config.sections)) { + const sections = config.sections; + let index = -~sections.findIndex((i: any) => i.settings?.includes("ACCOUNT")) || 1; + Object.keys(registeredSections).forEach(sect => { - sections.splice(index++, 0, { - label: sect, - title: sect, - settings: registeredSections[sect].map(a => a.key) - }); + const alreadyExists = sections.some((s: any) => s.label === sect); + if (!alreadyExists) { + sections.splice(index++, 0, { + label: sect, + title: sect, + settings: registeredSections[sect].map(a => a.key) + }); + } }); - })); -} + } + + return ret; +}))}; \ No newline at end of file diff --git a/src/lib/utils/constants.ts b/src/lib/utils/constants.ts index 834756d..2cdd23b 100644 --- a/src/lib/utils/constants.ts +++ b/src/lib/utils/constants.ts @@ -8,9 +8,12 @@ export const BUNNY_PROXY_PREFIX = "https://bn-plugins.github.io/vd-proxy"; export const NEXPID_PLUGINS_REPO_URL = "https://revenge.nexpid.xyz"; //export const OFFICIAL_PLUGINS_REPO_URL = "https://bn-plugins.github.io/dist/repo.json"; -export const OFFICIAL_PLUGINS_REPO_URL = "https://raw.githubusercontent.com/Purple-EyeZ/Plugins-List/refs/heads/main/src/plugins-data.json"; +export const OFFICIAL_PLUGINS_REPO_URL = ""; export const VD_PROXY_PREFIX = "https://vd-plugins.github.io/proxy"; export const VD_DISCORD_SERVER_ID = "1015931589865246730"; export const VD_PLUGINS_CHANNEL_ID = "1091880384561684561"; export const VD_THEMES_CHANNEL_ID = "1091880434939482202"; +export const KETTU_DISCORD_SERVER_ID = "1368145952266911755"; +export const KETTU_PLUGINS_CHANNEL_ID = "1432796541210333284"; +export const KETTU_THEMES_CHANNEL_ID = "1408405946434195540"; \ No newline at end of file