Skip to content

Commit

Permalink
attempting to fix splash
Browse files Browse the repository at this point in the history
  • Loading branch information
byeoon committed Oct 24, 2024
1 parent 07504c5 commit 2705b97
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default async () => {

// Once done, load plugins
unloads.push(await initPlugins());
// shitass feature unloads.push(await initSplash());
unloads.push(await initSplash());

// We good :D
logger.log("Opti is ready!");
Expand Down
26 changes: 22 additions & 4 deletions src/lib/security.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
import AssetBrowser from "@/ui/settings/pages/AssetBrowser";
import Developer from "@/ui/settings/pages/Developer";
import { ReactNative as RN, NavigationNative } from "@metro/common";

import { findByProps } from "./metro/filters";
const { hideActionSheet } = findByProps("openLazy", "hideActionSheet");

export function initSplash() {
const navigation = NavigationNative.useNavigation();
// hm
const { showSimpleActionSheet } = findByProps("showSimpleActionSheet");
console.log("Loading Opti Security");
window.alert("This is a test.");
if(window.vendetta.settings.developerSettings) {
showSimpleActionSheet({
key: "OptiPostload",
header: {
title: "Opti Post Loader",
onClose: () => hideActionSheet(),
},
options: [
// TODO: add logic
{ label: "Toggle Safe Mode", onPress: (o : any) => {
window.vendetta.settings.safeMode = o; }
},
{ label: "Load without Opti",onPress: () =>{
alert("no");
} },
],
})
}
}
// navigation.push("VendettaCustomPage", {
// title: "Asset Browser",
// render: AssetBrowser,
// })
}
3 changes: 2 additions & 1 deletion src/ui/settings/components/AddonPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ interface AddonPageProps<T> {
}

export default function AddonPage<T>({ items, safeModeMessage, safeModeExtras, card: CardComponent }: AddonPageProps<T>) {
useProxy(settings)
//@ts-ignore fuck this error. why does it always show up, i dont know
useProxy(settings);
useProxy(items);
const [search, setSearch] = React.useState("");

Expand Down

0 comments on commit 2705b97

Please sign in to comment.