diff --git a/plugins/rose-plugs/src/index.ts b/plugins/rose-plugs/src/index.ts index d01aa09..52666bd 100644 --- a/plugins/rose-plugs/src/index.ts +++ b/plugins/rose-plugs/src/index.ts @@ -2,6 +2,7 @@ import { logger } from "@vendetta"; import { getAssetIDByName } from "@vendetta/ui/assets"; import Settings from "./ui/Settings"; import patchRosiesPlugsSection, { SectionRow } from "./patches/settings"; +import { discoverRosiesPlugins } from "./patches/discoverPlugins"; let unpatch: (() => void) | undefined; @@ -10,14 +11,25 @@ function StubPluginsScreen() { } function buildRows(): SectionRow[] { - return [ + const rows: SectionRow[] = [ { - key: "ROSES_PLUGS_STUB", + key: "ROSES_PLUGS_BROWSER", title: () => "Plugins", icon: getAssetIDByName("SettingsIcon"), page: StubPluginsScreen, }, ]; + + for (const plugin of discoverRosiesPlugins()) { + if (!plugin.settingsComponent) continue; + rows.push({ + key: `ROSES_PLUGS_${plugin.id}`, + title: () => plugin.name, + page: plugin.settingsComponent as any, + }); + } + + return rows; } export default {