[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:
Jack 2023-02-06 03:34:22 -05:00 committed by GitHub
parent 1ae2da84fe
commit fec4c68f70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 28 deletions

View file

@ -39,8 +39,9 @@ export default function Developer() {
leading={<FormRow.Icon source={getAssetIDByName("copy")} />}
onPress={() => connectToDebugger(settings.debuggerUrl)}
/>
{window.__vendetta_rdc && <>
<FormDivider />
{window.__vendetta_rdc && <FormRow
<FormRow
label="Connect to React DevTools"
leading={<FormRow.Icon source={getAssetIDByName("ic_badge_staff")} />}
onPress={() => {
@ -55,7 +56,8 @@ export default function Developer() {
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
<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}`}

View file

@ -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>