[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,8 +39,9 @@ export default function Developer() {
|
||||||
leading={<FormRow.Icon source={getAssetIDByName("copy")} />}
|
leading={<FormRow.Icon source={getAssetIDByName("copy")} />}
|
||||||
onPress={() => connectToDebugger(settings.debuggerUrl)}
|
onPress={() => connectToDebugger(settings.debuggerUrl)}
|
||||||
/>
|
/>
|
||||||
|
{window.__vendetta_rdc && <>
|
||||||
<FormDivider />
|
<FormDivider />
|
||||||
{window.__vendetta_rdc && <FormRow
|
<FormRow
|
||||||
label="Connect to React DevTools"
|
label="Connect to React DevTools"
|
||||||
leading={<FormRow.Icon source={getAssetIDByName("ic_badge_staff")} />}
|
leading={<FormRow.Icon source={getAssetIDByName("ic_badge_staff")} />}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
@ -49,13 +50,14 @@ export default function Developer() {
|
||||||
host: settings.debuggerUrl.split(":")?.[0],
|
host: settings.debuggerUrl.split(":")?.[0],
|
||||||
resolveRNStyle: RN.StyleSheet.flatten,
|
resolveRNStyle: RN.StyleSheet.flatten,
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch (e) {
|
||||||
// TODO: Check if this ever actually catches anything
|
// TODO: Check if this ever actually catches anything
|
||||||
logger.error("Failed to connect to React DevTools!", e);
|
logger.error("Failed to connect to React DevTools!", e);
|
||||||
showToast("Failed to connect to React DevTools!", getAssetIDByName("Small"));
|
showToast("Failed to connect to React DevTools!", getAssetIDByName("Small"));
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>}
|
/>
|
||||||
|
</>}
|
||||||
</FormSection>
|
</FormSection>
|
||||||
{window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config">
|
{window.__vendetta_loader?.features.loaderConfig && <FormSection title="Loader config">
|
||||||
<FormSwitchRow
|
<FormSwitchRow
|
||||||
|
@ -67,12 +69,16 @@ export default function Developer() {
|
||||||
loaderConfig.customLoadUrl.enabled = v;
|
loaderConfig.customLoadUrl.enabled = v;
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{loaderConfig.customLoadUrl.enabled && <FormInput
|
<FormDivider />
|
||||||
|
{loaderConfig.customLoadUrl.enabled && <>
|
||||||
|
<FormInput
|
||||||
value={loaderConfig.customLoadUrl.url}
|
value={loaderConfig.customLoadUrl.url}
|
||||||
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
|
onChange={(v: string) => loaderConfig.customLoadUrl.url = v}
|
||||||
placeholder="http://localhost:4040/vendetta.js"
|
placeholder="http://localhost:4040/vendetta.js"
|
||||||
title="VENDETTA URL"
|
title="VENDETTA URL"
|
||||||
/>}
|
/>
|
||||||
|
<FormDivider />
|
||||||
|
</>}
|
||||||
{window.__vendetta_loader.features.devtools && <FormSwitchRow
|
{window.__vendetta_loader.features.devtools && <FormSwitchRow
|
||||||
label="Load React DevTools"
|
label="Load React DevTools"
|
||||||
subLabel={`Version: ${window.__vendetta_loader.features.devtools.version}`}
|
subLabel={`Version: ${window.__vendetta_loader.features.devtools.version}`}
|
||||||
|
|
|
@ -92,18 +92,18 @@ export default function General() {
|
||||||
/>
|
/>
|
||||||
</FormSection>
|
</FormSection>
|
||||||
<FormSection title="Versions">
|
<FormSection title="Versions">
|
||||||
{versions.map((v) => (
|
{versions.map((v, i) => (
|
||||||
<>
|
<>
|
||||||
<Version label={v.label} version={v.version} icon={v.icon} />
|
<Version label={v.label} version={v.version} icon={v.icon} />
|
||||||
<FormDivider />
|
{i !== versions.length - 1 && <FormDivider />}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
</FormSection>
|
</FormSection>
|
||||||
<FormSection title="Platform Info">
|
<FormSection title="Platform Info">
|
||||||
{platformInfo.map((p) => (
|
{platformInfo.map((p, i) => (
|
||||||
<>
|
<>
|
||||||
<Version label={p.label} version={p.version} icon={p.icon} />
|
<Version label={p.label} version={p.version} icon={p.icon} />
|
||||||
<FormDivider />
|
{i !== platformInfo.length - 1 && <FormDivider />}
|
||||||
</>
|
</>
|
||||||
))}
|
))}
|
||||||
</FormSection>
|
</FormSection>
|
||||||
|
|
Loading…
Reference in a new issue