mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 09:23:21 +01:00
UX: Remove the 'Source' and 'Link' URLs from NFT detail (#20248)
This commit is contained in:
parent
29ad914dc9
commit
91f6545c09
3
app/_locales/de/messages.json
generated
3
app/_locales/de/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Hoppla! Da hat etwas nicht geklappt."
|
||||
},
|
||||
"source": {
|
||||
"message": "Quelle"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Beschleunigen"
|
||||
},
|
||||
|
3
app/_locales/el/messages.json
generated
3
app/_locales/el/messages.json
generated
@ -3243,9 +3243,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Ουπς! Κάτι πήγε στραβά."
|
||||
},
|
||||
"source": {
|
||||
"message": "Πηγή"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Επιτάχυνση"
|
||||
},
|
||||
|
3
app/_locales/en/messages.json
generated
3
app/_locales/en/messages.json
generated
@ -4107,9 +4107,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Oops! Something went wrong."
|
||||
},
|
||||
"source": {
|
||||
"message": "Source"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Speed up"
|
||||
},
|
||||
|
3
app/_locales/es/messages.json
generated
3
app/_locales/es/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Lo lamentamos, se produjo un error."
|
||||
},
|
||||
"source": {
|
||||
"message": "Fuente"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Acelerar"
|
||||
},
|
||||
|
3
app/_locales/es_419/messages.json
generated
3
app/_locales/es_419/messages.json
generated
@ -2062,9 +2062,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Lo lamentamos, se produjo un error."
|
||||
},
|
||||
"source": {
|
||||
"message": "Fuente"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Acelerar"
|
||||
},
|
||||
|
3
app/_locales/fr/messages.json
generated
3
app/_locales/fr/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Oups ! Quelque chose a mal tourné. "
|
||||
},
|
||||
"source": {
|
||||
"message": "Source"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Accélérer"
|
||||
},
|
||||
|
3
app/_locales/hi/messages.json
generated
3
app/_locales/hi/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "ओह! कुछ गलत हो गया।"
|
||||
},
|
||||
"source": {
|
||||
"message": "स्रोत"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "जल्दी करें"
|
||||
},
|
||||
|
3
app/_locales/id/messages.json
generated
3
app/_locales/id/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Ups! Ada yang salah."
|
||||
},
|
||||
"source": {
|
||||
"message": "Sumber"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Percepat"
|
||||
},
|
||||
|
3
app/_locales/ja/messages.json
generated
3
app/_locales/ja/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "申し訳ありません。問題が発生しました。"
|
||||
},
|
||||
"source": {
|
||||
"message": "ソース"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "スピードアップ"
|
||||
},
|
||||
|
3
app/_locales/ko/messages.json
generated
3
app/_locales/ko/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "죄송합니다! 문제가 생겼습니다."
|
||||
},
|
||||
"source": {
|
||||
"message": "소스"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "가속화"
|
||||
},
|
||||
|
3
app/_locales/pt/messages.json
generated
3
app/_locales/pt/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Ops! Algo deu errado."
|
||||
},
|
||||
"source": {
|
||||
"message": "Origem"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Acelerar"
|
||||
},
|
||||
|
3
app/_locales/pt_BR/messages.json
generated
3
app/_locales/pt_BR/messages.json
generated
@ -2062,9 +2062,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Opa! Ocorreu algum erro."
|
||||
},
|
||||
"source": {
|
||||
"message": "Fonte"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Acelerar"
|
||||
},
|
||||
|
3
app/_locales/ru/messages.json
generated
3
app/_locales/ru/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Ой! Что-то пошло не так."
|
||||
},
|
||||
"source": {
|
||||
"message": "Источник"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Ускорить"
|
||||
},
|
||||
|
3
app/_locales/tl/messages.json
generated
3
app/_locales/tl/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Oops! Nagkaproblema."
|
||||
},
|
||||
"source": {
|
||||
"message": "Pinagmulan"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Pabilisin"
|
||||
},
|
||||
|
3
app/_locales/tr/messages.json
generated
3
app/_locales/tr/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Eyvah! Bir şeyler ters gitti."
|
||||
},
|
||||
"source": {
|
||||
"message": "Kaynak"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Hızlandır"
|
||||
},
|
||||
|
3
app/_locales/vi/messages.json
generated
3
app/_locales/vi/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "Rất tiếc! Đã xảy ra sự cố."
|
||||
},
|
||||
"source": {
|
||||
"message": "Nguồn"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "Tăng tốc"
|
||||
},
|
||||
|
3
app/_locales/zh_CN/messages.json
generated
3
app/_locales/zh_CN/messages.json
generated
@ -3246,9 +3246,6 @@
|
||||
"somethingWentWrong": {
|
||||
"message": "哎呀!出了点问题。"
|
||||
},
|
||||
"source": {
|
||||
"message": "来源"
|
||||
},
|
||||
"speedUp": {
|
||||
"message": "加速"
|
||||
},
|
||||
|
@ -16,8 +16,6 @@ describe('View ERC1155 NFT details', function () {
|
||||
};
|
||||
|
||||
it('user should be able to view ERC1155 NFT details', async function () {
|
||||
const expectedImageSource =
|
||||
'https://bafkreifvhjdf6ve4jfv6qytqtux5nd4nwnelioeiqx5x2ez5yrgrzk7ypi.ipfs.dweb.link';
|
||||
await withFixtures(
|
||||
{
|
||||
dapp: true,
|
||||
@ -57,11 +55,6 @@ describe('View ERC1155 NFT details', function () {
|
||||
const nftImage = await driver.findElement('.nft-item__container');
|
||||
assert.equal(await nftImage.isDisplayed(), true);
|
||||
|
||||
const nftImageSource = await driver.findElement(
|
||||
'.nft-details__image-source',
|
||||
);
|
||||
assert.equal(await nftImageSource.getText(), expectedImageSource);
|
||||
|
||||
const nftContract = await driver.findElement(
|
||||
'.nft-details__contract-wrapper',
|
||||
);
|
||||
|
@ -16,8 +16,6 @@ describe('View NFT details', function () {
|
||||
};
|
||||
|
||||
it('user should be able to view ERC721 NFT details', async function () {
|
||||
const expectedImageSource =
|
||||
'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM1MCIgd2lkdGg9IjM1MCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdGggaWQ9Ik15UGF0aCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZWQiIGQ9Ik0xMCw5MCBROTAsOTAgOTAsNDUgUTkwLDEwIDUwLDEwIFExMCwxMCAxMCw0MCBRMTAsNzAgNDUsNzAgUTcwLDcwIDc1LDUwIiAvPjwvZGVmcz48dGV4dD48dGV4dFBhdGggaHJlZj0iI015UGF0aCI+UXVpY2sgYnJvd24gZm94IGp1bXBzIG92ZXIgdGhlIGxhenkgZG9nLjwvdGV4dFBhdGg+PC90ZXh0Pjwvc3ZnPg==';
|
||||
await withFixtures(
|
||||
{
|
||||
dapp: true,
|
||||
@ -56,11 +54,6 @@ describe('View NFT details', function () {
|
||||
const nftImage = await driver.findElement('.nft-item__container');
|
||||
assert.equal(await nftImage.isDisplayed(), true);
|
||||
|
||||
const nftImageSource = await driver.findElement(
|
||||
'.nft-details__image-source',
|
||||
);
|
||||
assert.equal(await nftImageSource.getText(), expectedImageSource);
|
||||
|
||||
const nftContract = await driver.findElement(
|
||||
'.nft-details__contract-wrapper',
|
||||
);
|
||||
|
@ -141,27 +141,6 @@ exports[`NFT Details should match minimal props and state snapshot 1`] = `
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="box box--display-flex box--flex-direction-row"
|
||||
>
|
||||
<h6
|
||||
class="mm-box mm-text nft-details__link-title mm-text--body-sm-bold mm-box--margin-right-2 mm-box--margin-bottom-4 mm-box--color-text-default"
|
||||
>
|
||||
Source
|
||||
</h6>
|
||||
<h6
|
||||
class="mm-box mm-text nft-details__image-source mm-text--body-sm mm-box--margin-bottom-4 mm-box--color-primary-default"
|
||||
>
|
||||
<a
|
||||
href="https://bafybeiclzx7zfjvuiuwobn5ip3ogc236bjqfjzoblumf4pau4ep6dqramu.ipfs.dweb.link"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
title="https://bafybeiclzx7zfjvuiuwobn5ip3ogc236bjqfjzoblumf4pau4ep6dqramu.ipfs.dweb.link"
|
||||
>
|
||||
https://bafybeiclzx7zfjvuiuwobn5ip3ogc236bjqfjzoblumf4pau4ep6dqramu.ipfs.dweb.link
|
||||
</a>
|
||||
</h6>
|
||||
</div>
|
||||
<div
|
||||
class="box box--display-flex box--flex-direction-row"
|
||||
>
|
||||
|
@ -67,7 +67,6 @@ export default function NftDetails({ nft }) {
|
||||
standard,
|
||||
isCurrentlyOwned,
|
||||
lastSale,
|
||||
imageThumbnail,
|
||||
} = nft;
|
||||
const t = useI18nContext();
|
||||
const history = useHistory();
|
||||
@ -87,7 +86,6 @@ export default function NftDetails({ nft }) {
|
||||
);
|
||||
const nftImageAlt = getNftImageAlt(nft);
|
||||
const nftImageURL = getAssetImageURL(imageOriginal ?? image, ipfsGateway);
|
||||
const isDataURI = nftImageURL.startsWith('data:');
|
||||
|
||||
const formattedTimestamp = formatDate(
|
||||
new Date(lastSale?.event_timestamp).getTime(),
|
||||
@ -309,72 +307,6 @@ export default function NftDetails({ nft }) {
|
||||
</Box>
|
||||
</>
|
||||
) : null}
|
||||
<Box display={Display.Flex} flexDirection={FlexDirection.Row}>
|
||||
<Text
|
||||
color={TextColor.textDefault}
|
||||
variant={TextVariant.bodySmBold}
|
||||
as="h6"
|
||||
marginBottom={4}
|
||||
marginRight={2}
|
||||
className="nft-details__link-title"
|
||||
>
|
||||
{t('source')}
|
||||
</Text>
|
||||
<Text
|
||||
variant={TextVariant.bodySm}
|
||||
as="h6"
|
||||
marginBottom={4}
|
||||
className="nft-details__image-source"
|
||||
color={
|
||||
isDataURI ? TextColor.textDefault : TextColor.primaryDefault
|
||||
}
|
||||
>
|
||||
{isDataURI ? (
|
||||
<>{nftImageURL}</>
|
||||
) : (
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href={nftImageURL}
|
||||
title={nftImageURL}
|
||||
>
|
||||
{nftImageURL}
|
||||
</a>
|
||||
)}
|
||||
</Text>
|
||||
</Box>
|
||||
{imageThumbnail ? (
|
||||
<Box display={Display.Flex} flexDirection={FlexDirection.Row}>
|
||||
<Text
|
||||
color={TextColor.textDefault}
|
||||
variant={TextVariant.bodySmBold}
|
||||
as="h6"
|
||||
marginBottom={4}
|
||||
marginRight={2}
|
||||
className="nft-details__link-title"
|
||||
>
|
||||
{t('link')}
|
||||
</Text>
|
||||
<Text
|
||||
variant={TextVariant.bodySm}
|
||||
as="h6"
|
||||
marginBottom={4}
|
||||
className="nft-details__image-source"
|
||||
color={
|
||||
isDataURI ? TextColor.textDefault : TextColor.primaryDefault
|
||||
}
|
||||
>
|
||||
<a
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
href={nftImageURL}
|
||||
title={nftImageURL}
|
||||
>
|
||||
{imageThumbnail}
|
||||
</a>
|
||||
</Text>
|
||||
</Box>
|
||||
) : null}
|
||||
<Box display={Display.Flex} flexDirection={FlexDirection.Row}>
|
||||
<Text
|
||||
color={TextColor.textDefault}
|
||||
|
Loading…
Reference in New Issue
Block a user