From f2916d4b79ddb355c3057beaf87592eb520ba526 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Fri, 9 Feb 2024 23:55:36 +0700 Subject: [PATCH] fix: restore compatibility of plugins that have custom pages --- src/ui/settings/components/PluginCard.tsx | 2 +- src/ui/settings/data.tsx | 2 +- src/ui/settings/pages/Developer.tsx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/settings/components/PluginCard.tsx b/src/ui/settings/components/PluginCard.tsx index 1985943..e4ffdec 100644 --- a/src/ui/settings/components/PluginCard.tsx +++ b/src/ui/settings/components/PluginCard.tsx @@ -114,7 +114,7 @@ export default function PluginCard({ item: plugin, index }: CardWrapper) actions={[ ...(settings ? [{ icon: "settings", - onPress: () => navigation.push("RevengeCustomPage", { + onPress: () => navigation.push("VendettaCustomPage", { title: plugin.manifest.name, render: settings, }) diff --git a/src/ui/settings/data.tsx b/src/ui/settings/data.tsx index 1e8c2ea..0d00620 100644 --- a/src/ui/settings/data.tsx +++ b/src/ui/settings/data.tsx @@ -85,7 +85,7 @@ export const getScreens = (youKeys = false): Screen[] => [ render: Developer, }, { - key: formatKey("RevengeCustomPage", youKeys), + key: formatKey("VendettaCustomPage", youKeys), title: "Revenge Page", shouldRender: () => false, render: ({ render: PageView, noErrorBoundary, ...options }: { render: React.ComponentType; noErrorBoundary: boolean } & Record) => { diff --git a/src/ui/settings/pages/Developer.tsx b/src/ui/settings/pages/Developer.tsx index a0374a6..f48fc0a 100644 --- a/src/ui/settings/pages/Developer.tsx +++ b/src/ui/settings/pages/Developer.tsx @@ -80,7 +80,7 @@ export default function Developer() { label="Asset Browser" leading={} trailing={FormRow.Arrow} - onPress={() => navigation.push("RevengeCustomPage", { + onPress={() => navigation.push("VendettaCustomPage", { title: "Asset Browser", render: AssetBrowser, })} @@ -100,8 +100,8 @@ export default function Developer() { options: [ // @ts-expect-error // Of course, to trigger an error, we need to do something incorrectly. The below will do! - { label: "Revenge", onPress: () => navigation.push("RevengeCustomPage", { render: () => }) }, - { label: "Discord", isDestructive: true, onPress: () => navigation.push("RevengeCustomPage", { noErrorBoundary: true }) }, + { label: "Revenge", onPress: () => navigation.push("VendettaCustomPage", { render: () => }) }, + { label: "Discord", isDestructive: true, onPress: () => navigation.push("VendettaCustomPage", { noErrorBoundary: true }) }, ], })} />