diff --git a/src/core/ui/settings/pages/Developer/AssetBrowser.tsx b/src/core/ui/settings/pages/Developer/AssetBrowser.tsx index 0b32115..225ad51 100644 --- a/src/core/ui/settings/pages/Developer/AssetBrowser.tsx +++ b/src/core/ui/settings/pages/Developer/AssetBrowser.tsx @@ -14,11 +14,13 @@ export default function AssetBrowser() { style={{ margin: 10 }} onChangeText={(v: string) => setSearch(v)} /> + {/* TODO: Fix this, don't know why borderRadius is not working */} a.name.includes(search) || a.id.toString() === search)} - renderItem={({ item }) => } + // contentContainerStyle={{ borderRadius: 12, paddingHorizontal: 12, overflow: 'hidden' }} + renderItem={({ item }: any) => } ItemSeparatorComponent={LegacyFormDivider} - keyExtractor={item => item.name} /> diff --git a/src/core/ui/settings/pages/Developer/AssetDisplay.tsx b/src/core/ui/settings/pages/Developer/AssetDisplay.tsx index 429cebb..6378140 100644 --- a/src/core/ui/settings/pages/Developer/AssetDisplay.tsx +++ b/src/core/ui/settings/pages/Developer/AssetDisplay.tsx @@ -1,20 +1,40 @@ import { Asset } from "@lib/api/assets"; +import { lazyDestructure } from "@lib/utils/lazy"; +import { findByProps } from "@metro"; import { clipboard } from "@metro/common"; -import { LegacyFormRow } from "@metro/common/components"; +import { Stack, TableRow } from "@metro/common/components"; import { showToast } from "@ui/toasts"; import { Image } from "react-native"; +const { openAlert } = lazyDestructure(() => findByProps("openAlert", "dismissAlert")); +const { AlertModal, AlertActionButton } = lazyDestructure(() => findByProps("AlertModal", "AlertActions")); + interface AssetDisplayProps { asset: Asset; } export default function AssetDisplay({ asset }: AssetDisplayProps) { return ( - } + } onPress={() => { - clipboard.setString(asset.name); - showToast.showCopyToClipboard(); + openAlert("revenge-asset-display-details", } + actions={ + + copyToClipboard(asset.name)} /> + copyToClipboard(asset.id.toString())} /> + + } + />); }} /> ); } + +const copyToClipboard = (text: string) => { + clipboard.setString(text); + showToast.showCopyToClipboard(); +}; \ No newline at end of file