RosePlugs: replace stub row with discovered plugin settings rows

This commit is contained in:
Ally Founder 2026-08-11 18:03:46 -04:00
parent fcdaa831e6
commit 76e51cd11e

View file

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