[UI] The great divide
This commit is contained in:
parent
e51ae60aef
commit
65d57a0f69
3 changed files with 19 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { Forms } from "@ui/components";
|
import { Forms } from "@ui/components";
|
||||||
import { getAssetIDByName } from "@ui/assets";
|
import { getAssetIDByName } from "@ui/assets";
|
||||||
|
|
||||||
const { FormRow, FormSection } = Forms;
|
const { FormRow, FormSection, FormDivider } = Forms;
|
||||||
|
|
||||||
interface SettingsSectionProps {
|
interface SettingsSectionProps {
|
||||||
navigation: any;
|
navigation: any;
|
||||||
|
@ -16,12 +16,14 @@ export default function SettingsSection({ navigation }: SettingsSectionProps) {
|
||||||
trailing={FormRow.Arrow}
|
trailing={FormRow.Arrow}
|
||||||
onPress={() => navigation.push("VendettaSettings")}
|
onPress={() => navigation.push("VendettaSettings")}
|
||||||
/>
|
/>
|
||||||
|
<FormDivider />
|
||||||
<FormRow
|
<FormRow
|
||||||
label="Plugins"
|
label="Plugins"
|
||||||
leading={() => <FormRow.Icon source={getAssetIDByName("debug")} />}
|
leading={() => <FormRow.Icon source={getAssetIDByName("debug")} />}
|
||||||
trailing={FormRow.Arrow}
|
trailing={FormRow.Arrow}
|
||||||
onPress={() => navigation.push("VendettaPlugins")}
|
onPress={() => navigation.push("VendettaPlugins")}
|
||||||
/>
|
/>
|
||||||
|
<FormDivider />
|
||||||
<FormRow
|
<FormRow
|
||||||
label="Asset Browser"
|
label="Asset Browser"
|
||||||
leading={() => <FormRow.Icon source={getAssetIDByName("grid")} />}
|
leading={() => <FormRow.Icon source={getAssetIDByName("grid")} />}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Forms } from "@ui/components";
|
||||||
import { all } from "@ui/assets";
|
import { all } from "@ui/assets";
|
||||||
import AssetDisplay from "@ui/settings/components/AssetDisplay";
|
import AssetDisplay from "@ui/settings/components/AssetDisplay";
|
||||||
|
|
||||||
const { FormInput } = Forms;
|
const { FormInput, FormDivider } = Forms;
|
||||||
|
|
||||||
export default function AssetBrowser() {
|
export default function AssetBrowser() {
|
||||||
const [searchName, setSearchName] = React.useState("");
|
const [searchName, setSearchName] = React.useState("");
|
||||||
|
@ -18,7 +18,10 @@ export default function AssetBrowser() {
|
||||||
<RN.FlatList
|
<RN.FlatList
|
||||||
data={Object.values(all).filter(a => a.name.includes(searchName))}
|
data={Object.values(all).filter(a => a.name.includes(searchName))}
|
||||||
renderItem={({ item }) => (
|
renderItem={({ item }) => (
|
||||||
<AssetDisplay asset={item} />
|
<>
|
||||||
|
<AssetDisplay asset={item} />
|
||||||
|
<FormDivider />
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
keyExtractor={item => item.name}
|
keyExtractor={item => item.name}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { getAssetIDByName } from "@ui/assets";
|
||||||
import { Forms } from "@ui/components";
|
import { Forms } from "@ui/components";
|
||||||
import Version from "@ui/settings/components/Version";
|
import Version from "@ui/settings/components/Version";
|
||||||
|
|
||||||
const { FormRow, FormSection, FormInput } = Forms;
|
const { FormRow, FormSection, FormInput, FormDivider } = Forms;
|
||||||
const hermesProps = window.HermesInternal.getRuntimeProperties();
|
const hermesProps = window.HermesInternal.getRuntimeProperties();
|
||||||
const rnVer = RN.Platform.constants.reactNativeVersion;
|
const rnVer = RN.Platform.constants.reactNativeVersion;
|
||||||
|
|
||||||
|
@ -37,14 +37,14 @@ export default function General() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RN.ScrollView>
|
<RN.ScrollView>
|
||||||
{/* Why is there still a divider? */}
|
<FormSection title="Links">
|
||||||
<FormSection title="Links" android_noDivider>
|
|
||||||
<FormRow
|
<FormRow
|
||||||
label="Discord Server"
|
label="Discord Server"
|
||||||
leading={() => <FormRow.Icon source={getAssetIDByName("Discord")} />}
|
leading={() => <FormRow.Icon source={getAssetIDByName("Discord")} />}
|
||||||
trailing={FormRow.Arrow}
|
trailing={FormRow.Arrow}
|
||||||
onPress={() => url.openURL(DISCORD_SERVER)}
|
onPress={() => url.openURL(DISCORD_SERVER)}
|
||||||
/>
|
/>
|
||||||
|
<FormDivider />
|
||||||
<FormRow
|
<FormRow
|
||||||
label="GitHub"
|
label="GitHub"
|
||||||
leading={() => <FormRow.Icon source={getAssetIDByName("img_account_sync_github_white")} />}
|
leading={() => <FormRow.Icon source={getAssetIDByName("img_account_sync_github_white")} />}
|
||||||
|
@ -58,12 +58,14 @@ export default function General() {
|
||||||
onChange={(v: string) => setDebuggerUrl(v)}
|
onChange={(v: string) => setDebuggerUrl(v)}
|
||||||
title="DEBUGGER URL"
|
title="DEBUGGER URL"
|
||||||
/>
|
/>
|
||||||
|
<FormDivider />
|
||||||
<FormRow
|
<FormRow
|
||||||
label="Connect to debug websocket"
|
label="Connect to debug websocket"
|
||||||
leading={() => <FormRow.Icon source={getAssetIDByName("copy")} />}
|
leading={() => <FormRow.Icon source={getAssetIDByName("copy")} />}
|
||||||
trailing={FormRow.Arrow}
|
trailing={FormRow.Arrow}
|
||||||
onPress={() => connectToDebugger(debuggerUrl)}
|
onPress={() => connectToDebugger(debuggerUrl)}
|
||||||
/>
|
/>
|
||||||
|
<FormDivider />
|
||||||
<FormRow
|
<FormRow
|
||||||
label="Reload Discord"
|
label="Reload Discord"
|
||||||
leading={() => <FormRow.Icon source={getAssetIDByName("ic_message_retry")} />}
|
leading={() => <FormRow.Icon source={getAssetIDByName("ic_message_retry")} />}
|
||||||
|
@ -72,7 +74,12 @@ export default function General() {
|
||||||
/>
|
/>
|
||||||
</FormSection>
|
</FormSection>
|
||||||
<FormSection title="Versions">
|
<FormSection title="Versions">
|
||||||
{versions.map((v) => <Version label={v.label} version={v.version} icon={v.icon} /> )}
|
{versions.map((v) => (
|
||||||
|
<>
|
||||||
|
<Version label={v.label} version={v.version} icon={v.icon} />
|
||||||
|
<FormDivider />
|
||||||
|
</>
|
||||||
|
))}
|
||||||
</FormSection>
|
</FormSection>
|
||||||
</RN.ScrollView>
|
</RN.ScrollView>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue