From fec4c68f70a0202344c9efa2e25b2cdffcd1700c Mon Sep 17 00:00:00 2001 From: Jack <30497388+FieryFlames@users.noreply.github.com> Date: Mon, 6 Feb 2023 03:34:22 -0500 Subject: [PATCH] [UI] iOS UI fixes (#19) * [UI > Developer] Move React DevTools FormDivider inside conditional inclusion * [UI > Developer] Add FormDividers to Loader config * [UI > General] Remove trailing FormDividers for versions and platform info * [UI > Developer] Remove extraneous FormDivider --- src/ui/settings/pages/Developer.tsx | 54 ++++++++++++++++------------- src/ui/settings/pages/General.tsx | 8 ++--- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/src/ui/settings/pages/Developer.tsx b/src/ui/settings/pages/Developer.tsx index 9851093..6769742 100644 --- a/src/ui/settings/pages/Developer.tsx +++ b/src/ui/settings/pages/Developer.tsx @@ -27,7 +27,7 @@ export default function Developer() { return ( - settings.debuggerUrl = v} placeholder="127.0.0.1:9090" @@ -39,23 +39,25 @@ export default function Developer() { leading={} onPress={() => connectToDebugger(settings.debuggerUrl)} /> - - {window.__vendetta_rdc && } - onPress={() => { - try { - window.__vendetta_rdc?.connectToDevTools({ - host: settings.debuggerUrl.split(":")?.[0], - resolveRNStyle: RN.StyleSheet.flatten, - }); - } catch(e) { - // TODO: Check if this ever actually catches anything - logger.error("Failed to connect to React DevTools!", e); - showToast("Failed to connect to React DevTools!", getAssetIDByName("Small")); - } - }} - />} + {window.__vendetta_rdc && <> + + } + onPress={() => { + try { + window.__vendetta_rdc?.connectToDevTools({ + host: settings.debuggerUrl.split(":")?.[0], + resolveRNStyle: RN.StyleSheet.flatten, + }); + } catch (e) { + // TODO: Check if this ever actually catches anything + logger.error("Failed to connect to React DevTools!", e); + showToast("Failed to connect to React DevTools!", getAssetIDByName("Small")); + } + }} + /> + } {window.__vendetta_loader?.features.loaderConfig && - {loaderConfig.customLoadUrl.enabled && loaderConfig.customLoadUrl.url = v} - placeholder="http://localhost:4040/vendetta.js" - title="VENDETTA URL" - />} + + {loaderConfig.customLoadUrl.enabled && <> + loaderConfig.customLoadUrl.url = v} + placeholder="http://localhost:4040/vendetta.js" + title="VENDETTA URL" + /> + + } {window.__vendetta_loader.features.devtools && - {versions.map((v) => ( + {versions.map((v, i) => ( <> - + {i !== versions.length - 1 && } ))} - {platformInfo.map((p) => ( + {platformInfo.map((p, i) => ( <> - + {i !== platformInfo.length - 1 && } ))}