Adjusting the padding in Alert / error state (#13819)

feature/default_network_editable
Niranjana Binoy 3 years ago committed by GitHub
parent 4bb2582200
commit 8174aaa6b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/_locales/de/messages.json
  2. 3
      app/_locales/el/messages.json
  3. 6
      app/_locales/en/messages.json
  4. 3
      app/_locales/es_419/messages.json
  5. 3
      app/_locales/fr/messages.json
  6. 3
      app/_locales/hi/messages.json
  7. 3
      app/_locales/id/messages.json
  8. 3
      app/_locales/ja/messages.json
  9. 3
      app/_locales/ko/messages.json
  10. 3
      app/_locales/pt_BR/messages.json
  11. 3
      app/_locales/ru/messages.json
  12. 3
      app/_locales/tl/messages.json
  13. 3
      app/_locales/tr/messages.json
  14. 3
      app/_locales/vi/messages.json
  15. 3
      app/_locales/zh_CN/messages.json
  16. 22
      ui/components/app/collectibles-detection-notice/collectibles-detection-notice.js
  17. 26
      ui/components/app/collectibles-detection-notice/index.scss
  18. 60
      ui/components/app/collectibles-tab/collectibles-tab.js
  19. 4
      ui/pages/add-collectible/add-collectible.js
  20. 18
      ui/pages/home/home.component.js
  21. 32
      ui/pages/home/index.scss

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Neu! NFT-Erkennung" "message": "Neu! NFT-Erkennung"
}, },
"newNFTsDetectedInfo": {
"message": "Erlaube der MetaMaske, NFTs automatisch von Opensea zu erkennen und in deiner MetaMask Wallet anzuzeigen."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "“$1” wurde erfolgreich hinzugefügt!" "message": "“$1” wurde erfolgreich hinzugefügt!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Νέο! Εντοπισμός NFT" "message": "Νέο! Εντοπισμός NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Επιτρέψτε στο MetaMask να ανιχνεύει αυτόματα NFTs από το Opensea και να εμφανίζεται στο πορτοφόλι σας MetaMask."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "Το “$1” προστέθηκε με επιτυχία!" "message": "Το “$1” προστέθηκε με επιτυχία!"
}, },

@ -2009,12 +2009,12 @@
"newContract": { "newContract": {
"message": "New Contract" "message": "New Contract"
}, },
"newNFTDetectedMessage": {
"message": "Allow MetaMask to automatically detect NFTs from Opensea and display in your wallet."
},
"newNFTsDetected": { "newNFTsDetected": {
"message": "New! NFT detection" "message": "New! NFT detection"
}, },
"newNFTsDetectedInfo": {
"message": "Allow MetaMask to automatically detect NFTs from Opensea and display in your MetaMask wallet."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "“$1” was successfully added!" "message": "“$1” was successfully added!"
}, },

@ -1787,9 +1787,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "¡Nuevo! Detección NFT" "message": "¡Nuevo! Detección NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Permitir que MetaMask detecte automáticamente NFT de Opensea y los muestre en su cartera MetaMask."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "¡\"$1\" se añadió con éxito!" "message": "¡\"$1\" se añadió con éxito!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Nouveau! Détection de NFT" "message": "Nouveau! Détection de NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Cela permet à MetaMask de détecter automatiquement les NFT d’Opensea et de les afficher dans votre portefeuille MetaMask."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": $1» a été ajouté avec succès!" "message": $1» a été ajouté avec succès!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "नय! NFT डिशन" "message": "नय! NFT डिशन"
}, },
"newNFTsDetectedInfo": {
"message": "MetaMask क Opensea स NFT कवचित रप स पत लग और अपन MetaMask वट मरदरित करन अनमति।"
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "\"$1\" सफलतवक ज गय!" "message": "\"$1\" सफलतवक ज गय!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Baru! Deteksi NFT" "message": "Baru! Deteksi NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Izinkan MetaMask untuk mendeteksi NFT dari Opensea secara otomatis dan menampilkannya di dompet MetaMask Anda."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "“$1” berhasil ditambahkan!" "message": "“$1” berhasil ditambahkan!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "新機能! NFT検出" "message": "新機能! NFT検出"
}, },
"newNFTsDetectedInfo": {
"message": "MetaMaskがOpenseからNFTを自動的に検出し、MetaMaskウォレットに表示できるようにします。"
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "「$1」が追加されました!" "message": "「$1」が追加されました!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "신규! NFT 감지" "message": "신규! NFT 감지"
}, },
"newNFTsDetectedInfo": {
"message": "MetaMask가 Opensea에서 자동으로 NFT를 감지하고 MetaMask 지갑에 표시하도록 허용합니다."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "“$1”가 성공적으로 추가되었습니다!" "message": "“$1”가 성공적으로 추가되었습니다!"
}, },

@ -1771,9 +1771,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Novidade! Detecção de NFT" "message": "Novidade! Detecção de NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Autorize que a MetaMask detecte NFTs automaticamente do Opensea e os exiba na sua carteira MetaMask."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "“$1” foi adicionado com sucesso!" "message": "“$1” foi adicionado com sucesso!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Новинка! Обнаружение NFT" "message": "Новинка! Обнаружение NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Разрешите MetaMask автоматически обнаруживать NFT из Opensea и отображать их в вашем кошельке MetaMask."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "«$1» успешно добавлен!" "message": "«$1» успешно добавлен!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Bago! Pag-detect ng NFT" "message": "Bago! Pag-detect ng NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Payagan ang MetaMask na awtomatikong i-detect ang mga NFT mula sa Opensea at ipakita sa iyong MetaMask wallet."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "Ang “$1” matagumpay na naidagdag!" "message": "Ang “$1” matagumpay na naidagdag!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Yeni! NFT algılama" "message": "Yeni! NFT algılama"
}, },
"newNFTsDetectedInfo": {
"message": "MetaMask'in otomatik olarak Opensea'den NFT'leri algılamasına ve MetaMask cüzdanınızda görüntülemesine izin verin."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "\"$1\" başarılı bir şekilde eklendi!" "message": "\"$1\" başarılı bir şekilde eklendi!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "Mới! Phát hiện NFT" "message": "Mới! Phát hiện NFT"
}, },
"newNFTsDetectedInfo": {
"message": "Cho phép MetaMask tự động phát hiện NFT từ Opensea và hiển thị trong ví MetaMask của bạn."
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "“$1” đã được thêm thành công!" "message": "“$1” đã được thêm thành công!"
}, },

@ -1738,9 +1738,6 @@
"newNFTsDetected": { "newNFTsDetected": {
"message": "新功能!NFT 检测" "message": "新功能!NFT 检测"
}, },
"newNFTsDetectedInfo": {
"message": "允许 MetaMask自动检测Opensea 的 NFT,并在您的 MetaMask钱包中显示。"
},
"newNetworkAdded": { "newNetworkAdded": {
"message": "成功添加了“$1”!" "message": "成功添加了“$1”!"
}, },

@ -20,22 +20,28 @@ export default function CollectiblesDetectionNotice() {
const history = useHistory(); const history = useHistory();
return ( return (
<Box marginBottom={4} className="collectibles-detection-notice"> <Box className="collectibles-detection-notice">
<Dialog type="message" className="collectibles-detection-notice__message"> <Dialog type="message" className="collectibles-detection-notice__message">
<button <button
onClick={() => setCollectiblesDetectionNoticeDismissed()} onClick={() => setCollectiblesDetectionNoticeDismissed()}
className="collectibles-detection-notice__message__close-button" className="fas fa-times collectibles-detection-notice__message__close-button"
data-testid="collectibles-detection-notice-close" data-testid="collectibles-detection-notice-close"
/> />
<Box display={DISPLAY.FLEX}> <Box display={DISPLAY.FLEX}>
<Box paddingTop={2}> <Box paddingTop={1}>
<i style={{ fontSize: '1rem' }} className="fa fa-info-circle" /> <i
style={{
fontSize: '1rem',
color: 'var(--color-primary-default)',
}}
className="fa fa-info-circle"
/>
</Box> </Box>
<Box paddingLeft={4}> <Box paddingLeft={2}>
<Typography <Typography
color={COLORS.TEXT_DEFAULT} color={COLORS.TEXT_DEFAULT}
align={TEXT_ALIGN.LEFT} align={TEXT_ALIGN.LEFT}
variant={TYPOGRAPHY.H6} variant={TYPOGRAPHY.H7}
fontWeight={FONT_WEIGHT.BOLD} fontWeight={FONT_WEIGHT.BOLD}
> >
{t('newNFTsDetected')} {t('newNFTsDetected')}
@ -43,10 +49,10 @@ export default function CollectiblesDetectionNotice() {
<Typography <Typography
color={COLORS.TEXT_DEFAULT} color={COLORS.TEXT_DEFAULT}
align={TEXT_ALIGN.LEFT} align={TEXT_ALIGN.LEFT}
variant={TYPOGRAPHY.H6} variant={TYPOGRAPHY.H7}
boxProps={{ marginBottom: 4 }} boxProps={{ marginBottom: 4 }}
> >
{t('newNFTsDetectedInfo')} {t('newNFTDetectedMessage')}
</Typography> </Typography>
<Button <Button
type="link" type="link"

@ -1,26 +1,20 @@
.collectibles-detection-notice { .collectibles-detection-notice {
margin: 16px 16px 0 16px;
&__message { &__message {
position: relative; position: relative;
padding: 0 1rem 1rem 1rem !important; padding: 0.75rem 0.75rem 1rem 0.75rem !important;
&__close-button {
background-color: transparent;
&::after { & &__close-button {
position: absolute; color: var(--color-icon-default);
content: '\00D7'; background: none;
font-size: 29px; position: absolute;
font-weight: 200; cursor: pointer;
color: var(--color-icon-default); right: 8px;
background-color: transparent;
top: 0;
right: 12px;
cursor: pointer;
}
} }
a.collectibles-detection-notice__message__link { a.collectibles-detection-notice__message__link {
@include H6; @include H7;
width: 100%; width: 100%;
padding: 0; padding: 0;

@ -58,7 +58,7 @@ export default function CollectiblesTab({ onAddNFT }) {
} }
return ( return (
<div className="collectibles-tab"> <Box className="collectibles-tab">
{Object.keys(collections).length > 0 || {Object.keys(collections).length > 0 ||
previouslyOwnedCollection.collectibles.length > 0 ? ( previouslyOwnedCollection.collectibles.length > 0 ? (
<CollectiblesItems <CollectiblesItems
@ -66,40 +66,42 @@ export default function CollectiblesTab({ onAddNFT }) {
previouslyOwnedCollection={previouslyOwnedCollection} previouslyOwnedCollection={previouslyOwnedCollection}
/> />
) : ( ) : (
<Box padding={[6, 12, 6, 12]}> <>
{isMainnet && {isMainnet &&
!useCollectibleDetection && !useCollectibleDetection &&
!collectibleDetectionNoticeDismissed ? ( !collectibleDetectionNoticeDismissed ? (
<CollectiblesDetectionNotice /> <CollectiblesDetectionNotice />
) : null} ) : null}
<Box justifyContent={JUSTIFY_CONTENT.CENTER}> <Box padding={12}>
<img src="./images/no-nfts.svg" /> <Box justifyContent={JUSTIFY_CONTENT.CENTER}>
</Box> <img src="./images/no-nfts.svg" />
<Box </Box>
marginTop={4} <Box
marginBottom={12} marginTop={4}
justifyContent={JUSTIFY_CONTENT.CENTER} marginBottom={12}
flexDirection={FLEX_DIRECTION.COLUMN} justifyContent={JUSTIFY_CONTENT.CENTER}
className="collectibles-tab__link" flexDirection={FLEX_DIRECTION.COLUMN}
> className="collectibles-tab__link"
<Typography
color={COLORS.TEXT_MUTED}
variant={TYPOGRAPHY.H4}
align={TEXT_ALIGN.CENTER}
fontWeight={FONT_WEIGHT.BOLD}
> >
{t('noNFTs')} <Typography
</Typography> color={COLORS.TEXT_MUTED}
<Button variant={TYPOGRAPHY.H4}
type="link" align={TEXT_ALIGN.CENTER}
target="_blank" fontWeight={FONT_WEIGHT.BOLD}
rel="noopener noreferrer" >
href="https://metamask.zendesk.com/hc/en-us/articles/360058238591-NFT-tokens-in-MetaMask-wallet" {t('noNFTs')}
> </Typography>
{t('learnMoreUpperCase')} <Button
</Button> type="link"
target="_blank"
rel="noopener noreferrer"
href="https://metamask.zendesk.com/hc/en-us/articles/360058238591-NFT-tokens-in-MetaMask-wallet"
>
{t('learnMoreUpperCase')}
</Button>
</Box>
</Box> </Box>
</Box> </>
)} )}
<Box <Box
marginBottom={4} marginBottom={4}
@ -152,7 +154,7 @@ export default function CollectiblesTab({ onAddNFT }) {
</Box> </Box>
</Box> </Box>
</Box> </Box>
</div> </Box>
); );
} }

@ -93,7 +93,7 @@ export default function AddCollectible() {
}} }}
disabled={disabled} disabled={disabled}
contentComponent={ contentComponent={
<Box padding={[1, 4]}> <Box>
{isMainnet && {isMainnet &&
!useCollectibleDetection && !useCollectibleDetection &&
!collectibleDetectionNoticeDismissed ? ( !collectibleDetectionNoticeDismissed ? (
@ -122,7 +122,7 @@ export default function AddCollectible() {
} }
/> />
)} )}
<Box marginTop={4}> <Box margin={4}>
<FormField <FormField
id="address" id="address"
titleText={t('address')} titleText={t('address')}

@ -13,6 +13,7 @@ import TransactionList from '../../components/app/transaction-list';
import MenuBar from '../../components/app/menu-bar'; import MenuBar from '../../components/app/menu-bar';
import Popover from '../../components/ui/popover'; import Popover from '../../components/ui/popover';
import Button from '../../components/ui/button'; import Button from '../../components/ui/button';
import Box from '../../components/ui/box';
import ConnectedSites from '../connected-sites'; import ConnectedSites from '../connected-sites';
import ConnectedAccounts from '../connected-accounts'; import ConnectedAccounts from '../connected-accounts';
import { Tabs, Tab } from '../../components/ui/tabs'; import { Tabs, Tab } from '../../components/ui/tabs';
@ -24,6 +25,7 @@ import Typography from '../../components/ui/typography/typography';
import { import {
TYPOGRAPHY, TYPOGRAPHY,
FONT_WEIGHT, FONT_WEIGHT,
DISPLAY,
///: BEGIN:ONLY_INCLUDE_IN(flask) ///: BEGIN:ONLY_INCLUDE_IN(flask)
COLORS, COLORS,
///: END:ONLY_INCLUDE_IN ///: END:ONLY_INCLUDE_IN
@ -310,8 +312,8 @@ export default class Home extends PureComponent {
type="success" type="success"
className="home__new-network-notification" className="home__new-network-notification"
message={ message={
<div className="home__new-network-notification-message"> <Box display={DISPLAY.INLINE_FLEX}>
<i className="fa fa-check-circle home__new-network-notification-message--icon" /> <i className="fa fa-check-circle home__new-nft-notification-icon" />
<Typography <Typography
variant={TYPOGRAPHY.H7} variant={TYPOGRAPHY.H7}
fontWeight={FONT_WEIGHT.NORMAL} fontWeight={FONT_WEIGHT.NORMAL}
@ -319,11 +321,11 @@ export default class Home extends PureComponent {
{t('newCollectibleAddedMessage')} {t('newCollectibleAddedMessage')}
</Typography> </Typography>
<button <button
className="fas fa-times home__close" className="fas fa-times home__new-nft-notification-close"
title={t('close')} title={t('close')}
onClick={() => setNewCollectibleAddedMessage('')} onClick={() => setNewCollectibleAddedMessage('')}
/> />
</div> </Box>
} }
/> />
) : null} ) : null}
@ -332,8 +334,8 @@ export default class Home extends PureComponent {
type="success" type="success"
className="home__new-network-notification" className="home__new-network-notification"
message={ message={
<div className="home__new-network-notification-message"> <Box display={DISPLAY.INLINE_FLEX}>
<i className="fa fa-check-circle home__new-network-notification-message--icon" /> <i className="fa fa-check-circle home__new-network-notification-icon" />
<Typography <Typography
variant={TYPOGRAPHY.H7} variant={TYPOGRAPHY.H7}
fontWeight={FONT_WEIGHT.NORMAL} fontWeight={FONT_WEIGHT.NORMAL}
@ -341,11 +343,11 @@ export default class Home extends PureComponent {
{t('newNetworkAdded', [newNetworkAdded])} {t('newNetworkAdded', [newNetworkAdded])}
</Typography> </Typography>
<button <button
className="fas fa-times home__close" className="fas fa-times home__new-network-notification-close"
title={t('close')} title={t('close')}
onClick={() => setNewNetworkAdded('')} onClick={() => setNewNetworkAdded('')}
/> />
</div> </Box>
} }
/> />
) : null} ) : null}

@ -138,24 +138,42 @@
margin-bottom: 50px; margin-bottom: 50px;
} }
&__new-network-notification-message { &__new-network-notification {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
&--icon { &-icon {
margin-right: 8px; margin-right: 8px;
padding-top: 8px;
color: var(--color-success-default); color: var(--color-success-default);
} }
}
&__close { &-close {
color: var(--color-text-default); color: var(--color-icon-default);
background: none; background: none;
margin-left: 20px; margin-left: 20px;
}
} }
&__error-message { &__error-message {
left: 8px; left: 8px;
} }
&__new-nft-notification {
margin-bottom: 24px;
margin-right: 8px;
&-icon {
margin-right: 10px;
padding-top: 6px;
color: var(--color-success-default);
}
&-close {
color: var(--color-icon-default);
background: none;
margin-left: 44px;
}
}
} }

Loading…
Cancel
Save