Merge branch 'dev' into github

This commit is contained in:
cocobo1 2025-11-14 18:35:17 +02:00
commit d6adc102a5
7 changed files with 36 additions and 21 deletions

View file

@ -74,7 +74,7 @@ const config = {
constModules: {
globals: {
"bunny-build-info": {
version: `"v1.3.6"`
version: `"v1.3.7"`
}
}
},

View file

@ -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;

View file

@ -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
};
};

View file

@ -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);
}
}));
}
}

View file

@ -24,6 +24,7 @@ export interface PluginSettingsStorage {
}
export interface BunnyPluginManifest extends BunnyManifest {
name: string;
readonly type: "plugin";
readonly spec: 3;
readonly main: string;

View file

@ -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;
}))};

View file

@ -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";