diff --git a/src/lib/debug.ts b/src/lib/debug.ts index 4b70b37..7d83772 100644 --- a/src/lib/debug.ts +++ b/src/lib/debug.ts @@ -47,11 +47,18 @@ export function patchLogHook() { export const versionHash = "__vendettaVersion"; export function getDebugInfo() { + // Discord const InfoDictionaryManager = RN.NativeModules.InfoDictionaryManager; + const DCDDeviceManager = RN.NativeModules.DCDDeviceManager; + + // Hermes const hermesProps = window.HermesInternal.getRuntimeProperties(); + const hermesVer = hermesProps["OSS Release Version"]; + const padding = "for RN "; + + // RN const PlatformConstants = RN.Platform.constants as RNConstants; const rnVer = PlatformConstants.reactNativeVersion; - const DCDDeviceManager = RN.NativeModules.DCDDeviceManager; return { vendetta: { @@ -63,10 +70,10 @@ export function getDebugInfo() { }, react: { version: React.version, - nativeVersion: `${rnVer.major || 0}.${rnVer.minor || 0}.${rnVer.patch || 0}`, + nativeVersion: hermesVer.startsWith(padding) ? hermesVer.substring(padding.length) : `${rnVer.major}.${rnVer.minor}.${rnVer.patch}`, }, hermes: { - version: hermesProps["OSS Release Version"], + version: hermesVer, buildType: hermesProps["Build"], bytecodeVersion: hermesProps["Bytecode Version"], }, diff --git a/src/ui/settings/pages/AssetBrowser.tsx b/src/ui/settings/pages/AssetBrowser.tsx index 3dc20ce..d784ad6 100644 --- a/src/ui/settings/pages/AssetBrowser.tsx +++ b/src/ui/settings/pages/AssetBrowser.tsx @@ -16,17 +16,17 @@ const styles = stylesheet.createThemedStyleSheet({ }); export default function AssetBrowser() { - const [searchName, setSearchName] = React.useState(""); + const [search, setSearch] = React.useState(""); return ( setSearchName(v)} - placeholder="Search..." + onChangeText={(v: string) => setSearch(v)} + placeholder="Search" /> a.name.includes(searchName))} + data={Object.values(all).filter(a => a.name.includes(search) || a.id.toString() === search)} renderItem={({ item }) => ( <> diff --git a/src/ui/settings/pages/Developer.tsx b/src/ui/settings/pages/Developer.tsx index 2703e52..34e71d0 100644 --- a/src/ui/settings/pages/Developer.tsx +++ b/src/ui/settings/pages/Developer.tsx @@ -15,13 +15,12 @@ export default function Developer() { useProxy(settings); return ( - - + + { - settings.debuggerUrl = v; - }} + onChange={(v: string) => settings.debuggerUrl = v} + placeholder="127.0.0.1:9090" title="DEBUGGER URL" /> @@ -41,6 +40,7 @@ export default function Developer() { 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")); } @@ -58,6 +58,6 @@ export default function Developer() { })} /> - + ) } \ No newline at end of file diff --git a/src/ui/settings/pages/General.tsx b/src/ui/settings/pages/General.tsx index 3b021d6..5b4039c 100644 --- a/src/ui/settings/pages/General.tsx +++ b/src/ui/settings/pages/General.tsx @@ -35,8 +35,8 @@ export default function General() { icon: "mobile", }, { - label: "Hermes", - version: `${debugInfo.hermes.version} ${debugInfo.hermes.buildType} (Bytecode ${debugInfo.hermes.bytecodeVersion})`, + label: "Bytecode", + version: debugInfo.hermes.bytecodeVersion, icon: "ic_server_security_24px", }, ]; @@ -55,7 +55,7 @@ export default function General() { { label: "Manufacturer", version: debugInfo.device.manufacturer, - icon: "ic_hammer_and_chisel_24px" + icon: "ic_badge_staff" }, { label: "Brand", @@ -75,8 +75,8 @@ export default function General() { ]; return ( - - + + } diff --git a/src/ui/settings/pages/Plugins.tsx b/src/ui/settings/pages/Plugins.tsx index 91c64fd..7fc8fe6 100644 --- a/src/ui/settings/pages/Plugins.tsx +++ b/src/ui/settings/pages/Plugins.tsx @@ -17,11 +17,12 @@ export default function Plugins() { setPluginUrl(v)} + placeholder="https://example.com/" title="PLUGIN URL" /> } + leading={} onPress={() => { fetchPlugin(pluginUrl).then(() => { setPluginUrl("");