parent
e000d8384c
commit
13cf5e6872
6 changed files with 5 additions and 19 deletions
|
@ -1,9 +1,8 @@
|
|||
import { Asset } from "@types";
|
||||
import { ReactNative as RN, stylesheet } from "@metro/common";
|
||||
import { ReactNative as RN, stylesheet, clipboard } from "@metro/common";
|
||||
import { showToast } from "@ui/toasts";
|
||||
import { getAssetIDByName } from "@ui/assets";
|
||||
import { Forms } from "@ui/components";
|
||||
import copyText from "@lib/utils/copyText";
|
||||
|
||||
interface AssetDisplayProps {
|
||||
asset: Asset;
|
||||
|
@ -24,7 +23,7 @@ export default function AssetDisplay({ asset }: AssetDisplayProps) {
|
|||
label={`${asset.name} - ${asset.id}`}
|
||||
trailing={<RN.Image source={asset.id} style={styles.asset} />}
|
||||
onPress={() => {
|
||||
copyText(asset.name);
|
||||
clipboard.setString(asset.name);
|
||||
showToast("Copied asset name to clipboard.", getAssetIDByName("toast_copy_link"));
|
||||
}}
|
||||
/>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { ReactNative as RN, clipboard, stylesheet } from "@metro/common";
|
||||
import { ReactNative as RN, stylesheet, clipboard } from "@metro/common";
|
||||
import { HTTP_REGEX } from "@lib/constants";
|
||||
import { showInputAlert } from "@ui/alerts";
|
||||
import { getAssetIDByName } from "@ui/assets";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { clipboard } from "@metro/common";
|
||||
import { getAssetIDByName } from "@ui/assets";
|
||||
import { showToast } from "@ui/toasts";
|
||||
import { Forms } from "@ui/components";
|
||||
import copyText from "@utils/copyText";
|
||||
|
||||
interface VersionProps {
|
||||
label: string;
|
||||
|
@ -18,7 +18,7 @@ export default function Version({ label, version, icon }: VersionProps) {
|
|||
leading={<FormRow.Icon source={getAssetIDByName(icon)} />}
|
||||
trailing={<FormText>{version}</FormText>}
|
||||
onPress={() => {
|
||||
copyText(`${label} - ${version}`);
|
||||
clipboard.setString(`${label} - ${version}`);
|
||||
showToast("Copied version to clipboard.", getAssetIDByName("toast_copy_link"));
|
||||
}}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue