[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
This commit is contained in:
parent
1ae2da84fe
commit
fec4c68f70
2 changed files with 34 additions and 28 deletions
|
@ -39,23 +39,25 @@ export default function Developer() {
|
|||
leading={<FormRow.Icon source={getAssetIDByName("copy")} />}
|
||||
onPress={() => connectToDebugger(settings.debuggerUrl)}
|
||||
/>
|
||||
<FormDivider />
|
||||
{window.__vendetta_rdc && <FormRow
|
||||
label="Connect to React DevTools"
|
||||
leading={<FormRow.Icon source={getAssetIDByName("ic_badge_staff")} />}
|
||||
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 && <>
|
||||
<FormDivider />
|
||||
<FormRow
|
||||
label="Connect to React DevTools"
|
||||
leading={<FormRow.Icon source={getAssetIDByName("ic_badge_staff")} />}
|
||||
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"));
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</>}
|
||||
</FormSection>
|
||||
{window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config">
|
||||
<FormSwitchRow
|
||||
|
@ -67,12 +69,16 @@ export default function Developer() {
|
|||
loaderConfig.customLoadUrl.enabled = v;
|
||||
}}
|
||||
/>
|
||||
{loaderConfig.customLoadUrl.enabled && <FormInput
|
||||
value={loaderConfig.customLoadUrl.url}
|
||||
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
|
||||
placeholder="http://localhost:4040/vendetta.js"
|
||||
title="VENDETTA URL"
|
||||
/>}
|
||||
<FormDivider />
|
||||
{loaderConfig.customLoadUrl.enabled && <>
|
||||
<FormInput
|
||||
value={loaderConfig.customLoadUrl.url}
|
||||
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
|
||||
placeholder="http://localhost:4040/vendetta.js"
|
||||
title="VENDETTA URL"
|
||||
/>
|
||||
<FormDivider />
|
||||
</>}
|
||||
{window.__vendetta_loader.features.devtools && <FormSwitchRow
|
||||
label="Load React DevTools"
|
||||
subLabel={`Version: ${window.__vendetta_loader.features.devtools.version}`}
|
||||
|
|
|
@ -92,18 +92,18 @@ export default function General() {
|
|||
/>
|
||||
</FormSection>
|
||||
<FormSection title="Versions">
|
||||
{versions.map((v) => (
|
||||
{versions.map((v, i) => (
|
||||
<>
|
||||
<Version label={v.label} version={v.version} icon={v.icon} />
|
||||
<FormDivider />
|
||||
{i !== versions.length - 1 && <FormDivider />}
|
||||
</>
|
||||
))}
|
||||
</FormSection>
|
||||
<FormSection title="Platform Info">
|
||||
{platformInfo.map((p) => (
|
||||
{platformInfo.map((p, i) => (
|
||||
<>
|
||||
<Version label={p.label} version={p.version} icon={p.icon} />
|
||||
<FormDivider />
|
||||
{i !== platformInfo.length - 1 && <FormDivider />}
|
||||
</>
|
||||
))}
|
||||
</FormSection>
|
||||
|
|
Loading…
Reference in a new issue