1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Redesign 'Add Token' component (#8260)

The 'Add Token' component has been redesigned to be more in-line with
the new home screen design. The description instructing the user to
click the 'Add Token' button has been removed, and the section itself
has been made roughly the same size as one of the list item. The text
now appears on just one line, overflowing to two if necessary.
This commit is contained in:
Mark Stacey 2020-03-31 10:31:32 -03:00 committed by GitHub
parent f9767ed191
commit 4f80ff5b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 21 additions and 146 deletions

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "የሰንሰለት መታወቂያ" "message": "የሰንሰለት መታወቂያ"
}, },
"clickToAdd": {
"message": "ወደ መለያዎት ለማከል $1ላይ ጠቅ ያድርጉ"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "ሚስጥራዊ ቃላትን ለመግለጽ እዚህ ጠቅ ያድርጉ" "message": "ሚስጥራዊ ቃላትን ለመግለጽ እዚህ ጠቅ ያድርጉ"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "معرّف السلسلة" "message": "معرّف السلسلة"
}, },
"clickToAdd": {
"message": "انقر على $1لإضافتها إلى حسابك"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "انقر هنا للكشف عن الكلمات السرية" "message": "انقر هنا للكشف عن الكلمات السرية"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "Идентификатор на веригата" "message": "Идентификатор на веригата"
}, },
"clickToAdd": {
"message": "Кликнете върху $1, за да ги добавите към вашия акаунт"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Кликнете тук, за да разкриете тайните думи" "message": "Кликнете тук, за да разкриете тайните думи"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "চেন আইডি" "message": "চেন আইডি"
}, },
"clickToAdd": {
"message": "আপনার অ্যাকাউন্টে $1যোগ করতে সেগুলিতে ক্লিক করুন"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "গোপন শব্দগুলি প্রকাশ করতে এখানে ক্লিক করুন" "message": "গোপন শব্দগুলি প্রকাশ করতে এখানে ক্লিক করুন"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "Cadena ID" "message": "Cadena ID"
}, },
"clickToAdd": {
"message": "Fes clic a $1 per afegir-los al teu compte"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Fes clic aquí per a revelar les paraules secretes" "message": "Fes clic aquí per a revelar les paraules secretes"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "Kæde-ID" "message": "Kæde-ID"
}, },
"clickToAdd": {
"message": "Klik på $1 for at tilføje dem til din konto"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Klik her for at se hemmelige ord" "message": "Klik her for at se hemmelige ord"
}, },

View File

@ -188,9 +188,6 @@
"cancelled": { "cancelled": {
"message": "Abgebrochen" "message": "Abgebrochen"
}, },
"clickToAdd": {
"message": "Klicken Sie auf $1, um sie zu Ihrem Konto hinzuzufügen"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Hier klicken, um Geheimwörter zu enthüllen" "message": "Hier klicken, um Geheimwörter zu enthüllen"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "Αναγνωριστικό Αλυσίδας" "message": "Αναγνωριστικό Αλυσίδας"
}, },
"clickToAdd": {
"message": "Κάντε κλικ στο $1 για να τα προσθέσετε στον λογαριασμό σας"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Κάντε κλικ εδώ για να αποκαλύψετε μυστικές λέξεις" "message": "Κάντε κλικ εδώ για να αποκαλύψετε μυστικές λέξεις"
}, },

View File

@ -255,9 +255,6 @@
"chainId": { "chainId": {
"message": "Chain ID" "message": "Chain ID"
}, },
"clickToAdd": {
"message": "Click on $1 to add them to your account"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Click here to reveal secret words" "message": "Click here to reveal secret words"
}, },

View File

@ -160,9 +160,6 @@
"chainId": { "chainId": {
"message": "ID Cadena" "message": "ID Cadena"
}, },
"clickToAdd": {
"message": "Hazle clic en $1 para agregarles a su cuenta"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Haga clic aquí para revelar palabras secretas" "message": "Haga clic aquí para revelar palabras secretas"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "ID de cadena" "message": "ID de cadena"
}, },
"clickToAdd": {
"message": "Haz clic en $1 para agregarlos a tu cuenta"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Haz clic aquí para mostrar las palabras secretas" "message": "Haz clic aquí para mostrar las palabras secretas"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "Ahela ID" "message": "Ahela ID"
}, },
"clickToAdd": {
"message": "Klõpsake valikul $1, et need oma kontole lisada"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Klõpsake salasõnade kuvamiseks" "message": "Klõpsake salasõnade kuvamiseks"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "آی دی زنجیره" "message": "آی دی زنجیره"
}, },
"clickToAdd": {
"message": "بالای 1$1 کلیک نموده و آنرا به حساب تان اضافه نمایید"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "برای آشکار سازی کلمات مخفی اینجا کلیک نمایید" "message": "برای آشکار سازی کلمات مخفی اینجا کلیک نمایید"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "Ketjun tunnus" "message": "Ketjun tunnus"
}, },
"clickToAdd": {
"message": "Napsauta kohdetta $1 lisätäksesi ne tiliisi"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Paljasta salaiset sanat napsauttamalla tästä" "message": "Paljasta salaiset sanat napsauttamalla tästä"
}, },

View File

@ -176,9 +176,6 @@
"cancelled": { "cancelled": {
"message": "Nakansela" "message": "Nakansela"
}, },
"clickToAdd": {
"message": "Mag-click sa $1 para idagdag ang mga iyon sa iyong account"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Mag-click dito para ipakita ang iyong secret words" "message": "Mag-click dito para ipakita ang iyong secret words"
}, },

View File

@ -188,9 +188,6 @@
"chainId": { "chainId": {
"message": "ID de chaîne" "message": "ID de chaîne"
}, },
"clickToAdd": {
"message": "Cliquez sur $1 pour les ajouter à votre compte"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Cliquez ici pour révéler des mots secrets" "message": "Cliquez ici pour révéler des mots secrets"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "מזהה שרשרת" "message": "מזהה שרשרת"
}, },
"clickToAdd": {
"message": "לחצ/י על $1 כדי להוסיף אותם לחשבונך"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "לחצ/י כאן לחשיפת מילים סודיות" "message": "לחצ/י כאן לחשיפת מילים סודיות"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "चेन आई.डी." "message": "चेन आई.डी."
}, },
"clickToAdd": {
"message": "उन्हें अपने खाते में जोड़ने के लिए $1 पर क्लिक करें"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "सीक्रेट शब्दों को जानने के लिए यहाँ क्लिक करें" "message": "सीक्रेट शब्दों को जानने के लिए यहाँ क्लिक करें"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "Identifikacijska oznaka bloka" "message": "Identifikacijska oznaka bloka"
}, },
"clickToAdd": {
"message": "Kliknite na $1 kako biste ih dodali na svoj račun"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Ovdje kliknite za otkrivanje tajnih riječi" "message": "Ovdje kliknite za otkrivanje tajnih riječi"
}, },

View File

@ -94,9 +94,6 @@
"cancellationGasFee": { "cancellationGasFee": {
"message": "Anilasyon Gaz Chaj" "message": "Anilasyon Gaz Chaj"
}, },
"clickToAdd": {
"message": "Klike sou $ 1 pou ajoute yo nan kont ou"
},
"close": { "close": {
"message": "Fèmen" "message": "Fèmen"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "Lánc azonosítója" "message": "Lánc azonosítója"
}, },
"clickToAdd": {
"message": "Kattintson $1-re, hogy hozzáadja a fiókjához"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Kattintson ide a titkos szavak megjelenítéséhez" "message": "Kattintson ide a titkos szavak megjelenítéséhez"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "ID Rantai" "message": "ID Rantai"
}, },
"clickToAdd": {
"message": "Klik $1 untuk menambahkannya ke akun Anda"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Klik di sini untuk mengungkapkan kata-kata rahasia" "message": "Klik di sini untuk mengungkapkan kata-kata rahasia"
}, },

View File

@ -255,9 +255,6 @@
"chainId": { "chainId": {
"message": "Blockchain ID" "message": "Blockchain ID"
}, },
"clickToAdd": {
"message": "Clicca su $1 per aggiungerli al tuo account"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Clicca qui per rivelare la tua frase segreta" "message": "Clicca qui per rivelare la tua frase segreta"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "ಚೈನ್ ID" "message": "ಚೈನ್ ID"
}, },
"clickToAdd": {
"message": "ನಿಮ್ಮ ಖಾತೆಗೆ ಅವರನ್ನು ಸೇರಿಸಲು $1ನಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ "
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "ರಹಸ್ಯ ಪದಗಳನ್ನು ಬಹಿರಂಗಪಡಿಸಲು ಇಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ" "message": "ರಹಸ್ಯ ಪದಗಳನ್ನು ಬಹಿರಂಗಪಡಿಸಲು ಇಲ್ಲಿ ಕ್ಲಿಕ್ ಮಾಡಿ"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "체인 ID" "message": "체인 ID"
}, },
"clickToAdd": {
"message": "계정에 토큰을 추가하기 위해 $1를 클릭하세요."
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "비밀 단어를 보기 위해 여기를 클릭하세요." "message": "비밀 단어를 보기 위해 여기를 클릭하세요."
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "Grandinės ID" "message": "Grandinės ID"
}, },
"clickToAdd": {
"message": "Spustelėkite $1, kad juos pridėtumėte prie paskyros"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Spustelėkite čia, kad atidengtumėte slaptus žodžius" "message": "Spustelėkite čia, kad atidengtumėte slaptus žodžius"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "Ķēdes ID" "message": "Ķēdes ID"
}, },
"clickToAdd": {
"message": "Noklikšķiniet uz $1, lai pievienotu tos savam kontam"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Klikšķiniet šeit, lai skatītu slepenos vārdus" "message": "Klikšķiniet šeit, lai skatītu slepenos vārdus"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "ID Rantaian" "message": "ID Rantaian"
}, },
"clickToAdd": {
"message": "Klik pada $1 untuk menambahnya ke dalam akaun anda"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Klik di sini untuk mendedahkan perkataan rahsia" "message": "Klik di sini untuk mendedahkan perkataan rahsia"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "Blokkjede " "message": "Blokkjede "
}, },
"clickToAdd": {
"message": "Klikk på $1 for a legge dem til kontoen din "
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Klikk her for å vise hemmelige ord " "message": "Klikk her for å vise hemmelige ord "
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "Identyfikator łańcucha" "message": "Identyfikator łańcucha"
}, },
"clickToAdd": {
"message": "Przycisnij $1, aby dodać go do swojego konta"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Kliknij tutaj, aby odkryć tajne słowa" "message": "Kliknij tutaj, aby odkryć tajne słowa"
}, },

View File

@ -194,9 +194,6 @@
"chainId": { "chainId": {
"message": "ID da Cadeia" "message": "ID da Cadeia"
}, },
"clickToAdd": {
"message": "Clique em $1 para adicioná-los à sua conta"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Clique aqui para revelar as palavras secretas" "message": "Clique aqui para revelar as palavras secretas"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "ID lanț" "message": "ID lanț"
}, },
"clickToAdd": {
"message": "Faceți clic pe $1 pentru a-i adăuga contului dvs."
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Faceți clic aici pentru a arăta cuvintele secrete" "message": "Faceți clic aici pentru a arăta cuvintele secrete"
}, },

View File

@ -656,9 +656,6 @@
"chainId": { "chainId": {
"message": "ID сети" "message": "ID сети"
}, },
"clickToAdd": {
"message": "Нажмите на $1, для добавления в свой аккаунт"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Нажмите здесь, чтобы показать секретную фразу (сид)" "message": "Нажмите здесь, чтобы показать секретную фразу (сид)"
}, },

View File

@ -191,9 +191,6 @@
"chainId": { "chainId": {
"message": "ID reťazca" "message": "ID reťazca"
}, },
"clickToAdd": {
"message": "Kliknutím na $1 ich pridáte do svojho účtu"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Kliknutím sem odkryjete tajné slová" "message": "Kliknutím sem odkryjete tajné slová"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "ID verige" "message": "ID verige"
}, },
"clickToAdd": {
"message": "Kliknite na $1 za dodajo v vaš račun"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Kliknite tukaj, če želite razkriti skrivne besede" "message": "Kliknite tukaj, če želite razkriti skrivne besede"
}, },

View File

@ -197,9 +197,6 @@
"cancelled": { "cancelled": {
"message": "Otkazano" "message": "Otkazano"
}, },
"clickToAdd": {
"message": "Kliknite na $1 kako biste ih dodali na svoj nalog"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Kliknite ovde kako biste otkrili tajne reči" "message": "Kliknite ovde kako biste otkrili tajne reči"
}, },

View File

@ -194,9 +194,6 @@
"cancelled": { "cancelled": {
"message": "Avbruten" "message": "Avbruten"
}, },
"clickToAdd": {
"message": "Tryck på $1 för att lägga till dem på ditt konto."
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Klicka här för att visa hemliga ord" "message": "Klicka här för att visa hemliga ord"
}, },

View File

@ -194,9 +194,6 @@
"chainId": { "chainId": {
"message": "Utambulisho wa Mnyororo" "message": "Utambulisho wa Mnyororo"
}, },
"clickToAdd": {
"message": "Bofya kwenye $1 ili kuongeza kwenye akaunti yako"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Bofya hapa ili uonyeshe maneno ya siri" "message": "Bofya hapa ili uonyeshe maneno ya siri"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "ID мережі" "message": "ID мережі"
}, },
"clickToAdd": {
"message": "Клацніть на $1, щоб додати їх до вашого облікового запису"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "Клацніть тут, щоб відкрити секретні слова" "message": "Клацніть тут, щоб відкрити секретні слова"
}, },

View File

@ -200,9 +200,6 @@
"chainId": { "chainId": {
"message": "链 ID" "message": "链 ID"
}, },
"clickToAdd": {
"message": "点击 $1 将其加入您的个人账户"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "点击此处显示密语" "message": "点击此处显示密语"
}, },

View File

@ -197,9 +197,6 @@
"chainId": { "chainId": {
"message": "鏈 ID" "message": "鏈 ID"
}, },
"clickToAdd": {
"message": "點選下方 $1 新增資訊"
},
"clickToRevealSeed": { "clickToRevealSeed": {
"message": "點選顯示助憶詞" "message": "點選顯示助憶詞"
}, },

View File

@ -808,7 +808,7 @@ describe('MetaMask', function () {
}) })
it('clicks on the Add Token button', async function () { it('clicks on the Add Token button', async function () {
await driver.clickElement(By.xpath(`//div[contains(text(), 'Add Token')]`)) await driver.clickElement(By.xpath(`//button[contains(text(), 'Add Token')]`))
await driver.delay(regularDelayMs) await driver.delay(regularDelayMs)
}) })
@ -1239,7 +1239,7 @@ describe('MetaMask', function () {
describe('Add existing token using search', function () { describe('Add existing token using search', function () {
it('clicks on the Add Token button', async function () { it('clicks on the Add Token button', async function () {
await driver.clickElement(By.xpath(`//div[contains(text(), 'Add Token')]`)) await driver.clickElement(By.xpath(`//button[contains(text(), 'Add Token')]`))
await driver.delay(regularDelayMs) await driver.delay(regularDelayMs)
}) })

View File

@ -20,14 +20,13 @@ export default class AddTokenButton extends PureComponent {
return ( return (
<div className="add-token-button"> <div className="add-token-button">
<h1 className="add-token-button__help-header">{t('missingYourTokens')}</h1> <span className="add-token-button__description">{t('missingYourTokens')}</span>
<p className="add-token-button__help-desc">{t('clickToAdd', [t('addToken')])}</p> <button
<div
className="add-token-button__button" className="add-token-button__button"
onClick={onClick} onClick={onClick}
> >
{t('addToken')} {t('addToken')}
</div> </button>
</div> </div>
) )
} }

View File

@ -1,23 +1,22 @@
.add-token-button { .add-token-button {
display: flex; width: 100%;
flex-direction: column; height: 90px;
color: lighten($scorpion, 25%); padding: 20px;
width: 185px;
margin: 36px auto;
text-align: center; text-align: center;
font-size: 1rem;
&__help-header {
font-weight: bold;
font-size: 1rem;
}
&__help-desc {
font-size: 0.75rem;
margin-top: 1rem;
}
&__button { &__button {
@extend %small-link; background-color: transparent;
margin: 1rem; color: $Blue-500;
display: inline-block;
font-size: 1rem;
&:hover {
color: $Blue-400;
}
&:active {
color: $Blue-600;
}
} }
} }