Skip to content

Commit

Permalink
you know whats fucking awesome? not having loaderconfig enabled becau…
Browse files Browse the repository at this point in the history
…se im sideloading. fucking annoying. oh, wanna come up with a feature? sorry, can't! It'll crash because no FUCKING features are enabled
  • Loading branch information
byeoon committed Oct 24, 2024
1 parent 18ef16b commit 2c1b1f3
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/ui/settings/pages/Developer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const debugInfo = getDebugInfo();

export default function Developer() {
const navigation = NavigationNative.useNavigation();
let thevar = "";
//@ts-ignore
useProxy(settings);
//@ts-ignore
Expand Down Expand Up @@ -117,25 +116,25 @@ export default function Developer() {
/>
</>}
</TableRowGroup>
<TableRowGroup title="Loader Config">
{window.__vendetta_loader?.features.loaderConfig && <TableRowGroup title="Loader config">
<TableSwitchRow
label="Load from custom url"
subLabel={"Load Opti from a custom endpoint."}
icon={<TableRowIcon source={getAssetIDByName("copy")} />}
value={loaderConfig?.customLoadUrl?.enabled}
value={loaderConfig.customLoadUrl.enabled}
onValueChange={(v: boolean) => {
loaderConfig.customLoadUrl.enabled = v;
}}
/>
{loaderConfig?.customLoadUrl.enabled && <>
{loaderConfig.customLoadUrl.enabled && <>
<FormInput
value={loaderConfig?.customLoadUrl.url}
value={loaderConfig.customLoadUrl.url}
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
placeholder="http://localhost:4040/opti.js"
title="Opti URL"
/>
</>}
{window.__vendetta_loader?.features.devtools && <TableSwitchRow
{window.__vendetta_loader.features.devtools && <TableSwitchRow
label="Load React DevTools"
subLabel={`Version: ${window.__vendetta_loader.features.devtools.version}`}
icon={<TableRowIcon source={getAssetIDByName("ic_badge_staff")} />}
Expand All @@ -144,8 +143,7 @@ export default function Developer() {
loaderConfig.loadReactDevTools = v;
}}
/>}
</TableRowGroup>

</TableRowGroup>}
<TableRowGroup title="Other">
<TableRow
label="Asset Browser"
Expand All @@ -156,12 +154,6 @@ export default function Developer() {
})}
arrow
/>
<FormInput
value={thevar}
onChange={(v: string) => thevar = v}
placeholder="Developer"
title="URL to lead to"
/>
<TableRow
label="Opti Design Sheet"
icon={<TableRowIcon source={getAssetIDByName("ic_paint_brush")} />}
Expand Down

0 comments on commit 2c1b1f3

Please sign in to comment.