From 67b501b97483ef91f19b265b8876250974c4e3f6 Mon Sep 17 00:00:00 2001 From: Beef Date: Mon, 13 Feb 2023 20:20:24 +0000 Subject: [PATCH] [UI > Settings] Use Summary component --- src/ui/components.ts | 5 ---- src/ui/settings/pages/General.tsx | 44 ++++++++++++++++++------------- 2 files changed, 26 insertions(+), 23 deletions(-) delete mode 100644 src/ui/components.ts diff --git a/src/ui/components.ts b/src/ui/components.ts deleted file mode 100644 index 9564579..0000000 --- a/src/ui/components.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { findByDisplayName, findByProps } from "@metro/filters"; - -export const Forms = findByProps("Form", "FormSection"); -export const General = findByProps("Button", "Text", "View"); -export const Search = findByDisplayName("StaticSearchBarContainer"); \ No newline at end of file diff --git a/src/ui/settings/pages/General.tsx b/src/ui/settings/pages/General.tsx index 6f8ca6e..330fa1c 100644 --- a/src/ui/settings/pages/General.tsx +++ b/src/ui/settings/pages/General.tsx @@ -1,7 +1,7 @@ import { ReactNative as RN, url, invites } from "@metro/common"; import { DISCORD_SERVER, GITHUB } from "@lib/constants"; import { getAssetIDByName } from "@ui/assets"; -import { Forms } from "@ui/components"; +import { Forms, Summary } from "@ui/components"; import { getDebugInfo } from "@lib/debug"; import { useProxy } from "@lib/storage"; import settings from "@lib/settings"; @@ -17,7 +17,7 @@ export default function General() { { label: "Vendetta", version: debugInfo.vendetta.version, - icon: "ic_progress_wrench_24px" + icon: "ic_progress_wrench_24px", }, { label: "Discord", @@ -42,6 +42,11 @@ export default function General() { ]; const platformInfo = [ + { + label: "Loader", + version: debugInfo.vendetta.loader, + icon: "ic_download_24px", + }, { label: "Operating System", version: `${debugInfo.os.name} ${debugInfo.os.version}`, @@ -91,22 +96,6 @@ export default function General() { onPress={() => url.openURL(GITHUB)} /> - - {versions.map((v, i) => ( - <> - - {i !== versions.length - 1 && } - - ))} - - - {platformInfo.map((p, i) => ( - <> - - {i !== platformInfo.length - 1 && } - - ))} - + + + {versions.map((v, i) => ( + <> + + {i !== versions.length - 1 && } + + ))} + + + + {platformInfo.map((p, i) => ( + <> + + {i !== platformInfo.length - 1 && } + + ))} + + ) } \ No newline at end of file