Skip to content

Commit

Permalink
Extract "create vault" form to separate component (MetaMask#13461)
Browse files Browse the repository at this point in the history
The form used for creating a vault on the "Import" page of onboarding
and on the "Restore vault" page is nearly identical, yet the
implementation is totally separate. It has now been extracted to a
separate component, consolidating the two implementations.

There is a "terms of use" checkbox on the import page that isn't on the
restore vault page, so that part has been made optional. The "submit"
button text differs between the two uses as well, so that is
customizable.

There are slight styling differences between the old and new versions
of this form. The fonts and spacing are all using our new standard
design system guidelines, and we're using our standard checkbox now as
well. The spacing and font sizes were chosen somewhat arbitrarily by me
to resemble the old styles, so please feel free to suggest changes if
you think they can be improved upon.

There are some slight copy changes to the "Restore vault" page as well;
the placeholder text and the label for the "Secret Recovery Phrase"
field now matches the "Import" page copy.
  • Loading branch information
Gudahtt authored Feb 3, 2022
1 parent 760ed34 commit 429451d
Show file tree
Hide file tree
Showing 61 changed files with 416 additions and 884 deletions.
3 changes: 0 additions & 3 deletions app/_locales/am/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,6 @@
"sendTokens": {
"message": "ተለዋጭ ስሞችን ላክ"
},
"separateEachWord": {
"message": "እያንዳንዱን ቃል በነጠላ ክፍት ቦታ ይለያዩ"
},
"settings": {
"message": "ቅንብሮች"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/ar/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -877,9 +877,6 @@
"sendTokens": {
"message": "إرسال عملات رمزية"
},
"separateEachWord": {
"message": "افصل كل كلمة بمسافة واحدة"
},
"settings": {
"message": "الإعدادات"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/bg/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -872,9 +872,6 @@
"sendTokens": {
"message": "Изпращане на жетони"
},
"separateEachWord": {
"message": "Отделете всяка дума с интервал"
},
"settings": {
"message": "Настройки"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/bn/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,6 @@
"sendTokens": {
"message": "টোকেনগুলি পাঠান"
},
"separateEachWord": {
"message": "প্রতিটি শব্দকে একটি স্পেস দিয়ে আলাদা করুন"
},
"settings": {
"message": "সেটিংস"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/ca/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,6 @@
"sendTokens": {
"message": "Enviar Fitxes"
},
"separateEachWord": {
"message": "Separa cada paraula amb un sol espai"
},
"settings": {
"message": "Configuració"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/da/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,6 @@
"sendTokens": {
"message": "Send tokens"
},
"separateEachWord": {
"message": "Separer hvert ord med et enkelt mellemrum"
},
"settings": {
"message": "Indstillinger "
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -838,9 +838,6 @@
"sendTokens": {
"message": "Token senden"
},
"separateEachWord": {
"message": "Trennen Sie die Wörter mit einem einzelnen Leerzeichen voneinander"
},
"settings": {
"message": "Einstellungen"
},
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/el/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2460,9 +2460,6 @@
"message": "Αποστολή $1",
"description": "$1 represents the native currency symbol for the current network (e.g. ETH or BNB)"
},
"separateEachWord": {
"message": "Διαχωρίστε κάθε λέξη με ένα μόνο κενό"
},
"setAdvancedPrivacySettings": {
"message": "Ορίστε ρυθμίσεις απορρήτου για προχωρημένους"
},
Expand Down Expand Up @@ -3375,9 +3372,6 @@
"walletCreationSuccessTitle": {
"message": "Επιτυχής δημιουργία πορτοφολιού"
},
"walletSeedRestore": {
"message": "Μυστικής Φράσης Ανάκτησης Πορτοφολιού"
},
"web3ShimUsageNotification": {
"message": "Παρατηρήσαμε ότι η τρέχουσα ιστοσελίδα προσπάθησε να χρησιμοποιήσει το αφαιρεθέν window.web3 API. Αν η ιστοσελίδα φαίνεται να έχει παραβιαστεί, κάντε κλικ στο $1 για περισσότερες πληροφορίες.",
"description": "$1 is a clickable link."
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2582,9 +2582,6 @@
"message": "Sending $1",
"description": "$1 represents the native currency symbol for the current network (e.g. ETH or BNB)"
},
"separateEachWord": {
"message": "Separate each word with a single space"
},
"setAdvancedPrivacySettings": {
"message": "Set advanced privacy settings"
},
Expand Down Expand Up @@ -3503,9 +3500,6 @@
"walletCreationSuccessTitle": {
"message": "Wallet creation successful"
},
"walletSeedRestore": {
"message": "Wallet Secret Recovery Phrase"
},
"web3ShimUsageNotification": {
"message": "We noticed that the current website tried to use the removed window.web3 API. If the site appears to be broken, please click $1 for more information.",
"description": "$1 is a clickable link."
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1612,9 +1612,6 @@
"sendTokens": {
"message": "Enviar tokens"
},
"separateEachWord": {
"message": "Separar cada palabra con un solo espacio"
},
"settings": {
"message": "Configuración"
},
Expand Down Expand Up @@ -2263,9 +2260,6 @@
"walletConnectionGuide": {
"message": "nuestra guía de conexión de la cartera de hardware"
},
"walletSeedRestore": {
"message": "Frase secreta de recuperación de la cartera"
},
"web3ShimUsageNotification": {
"message": "Parece que el sitio web actual intentó utilizar la API de window.web3 que se eliminó. Si el sitio no funciona, haga clic en $1 para obtener más información.",
"description": "$1 is a clickable link."
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/es_419/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1624,9 +1624,6 @@
"sendTokens": {
"message": "Enviar tokens"
},
"separateEachWord": {
"message": "Separar cada palabra con un solo espacio"
},
"settings": {
"message": "Configuración"
},
Expand Down Expand Up @@ -2275,9 +2272,6 @@
"walletConnectionGuide": {
"message": "nuestra guía de conexión de la cartera de hardware"
},
"walletSeedRestore": {
"message": "Frase secreta de recuperación de la cartera"
},
"web3ShimUsageNotification": {
"message": "Parece que el sitio web actual intentó utilizar la API de window.web3 que se eliminó. Si el sitio no funciona, haga clic en $1 para obtener más información.",
"description": "$1 is a clickable link."
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/et/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -866,9 +866,6 @@
"sendTokens": {
"message": "Saada lube"
},
"separateEachWord": {
"message": "Eraldage iga sõna ühe tühikuga"
},
"settings": {
"message": "Seaded"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/fa/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,6 @@
"sendTokens": {
"message": "رمزیاب ها را ارسال کنید"
},
"separateEachWord": {
"message": "هر کلمه را با یک فاصله واحد جدا سازید"
},
"settings": {
"message": "تنظیمات"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/fi/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -873,9 +873,6 @@
"sendTokens": {
"message": "Lähetä tietueita"
},
"separateEachWord": {
"message": "Erottele sanat toisistaan yhdellä välilyönnillä"
},
"settings": {
"message": "Asetukset"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/fil/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,6 @@
"sendTokens": {
"message": "Magpadala ng Mga Token"
},
"separateEachWord": {
"message": "Paghiwa-hiwalayin ang bawat salita gamit ang isang space"
},
"settings": {
"message": "Mga Setting"
},
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2460,9 +2460,6 @@
"message": "Envoi de $1",
"description": "$1 represents the native currency symbol for the current network (e.g. ETH or BNB)"
},
"separateEachWord": {
"message": "Separez chaque mot avec un espace simple"
},
"setAdvancedPrivacySettings": {
"message": "Définir des paramètres de confidentialité avancés"
},
Expand Down Expand Up @@ -3375,9 +3372,6 @@
"walletCreationSuccessTitle": {
"message": "Portefeuille créé avec succès"
},
"walletSeedRestore": {
"message": "Phrase secrète de récupération du portefeuille"
},
"web3ShimUsageNotification": {
"message": "Nous avons remarqué que ce site Web a essayé d’utiliser l’API window.web3 supprimée. Si le site semble être défectueux, veuillez cliquer sur $1 pour plus d’informations.",
"description": "$1 is a clickable link."
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/he/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -870,9 +870,6 @@
"sendTokens": {
"message": "שלח טוקנים"
},
"separateEachWord": {
"message": "יש להפריד כל מילה עם רווח יחיד"
},
"settings": {
"message": "הגדרות"
},
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/hi/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2460,9 +2460,6 @@
"message": "$1 भेजा जा रहा है",
"description": "$1 represents the native currency symbol for the current network (e.g. ETH or BNB)"
},
"separateEachWord": {
"message": "प्रत्येक शब्द को एक रिक्ति से अलग करें"
},
"setAdvancedPrivacySettings": {
"message": "एडवांस गोपनीयता सेटिंग्स निर्धारित करें"
},
Expand Down Expand Up @@ -3375,9 +3372,6 @@
"walletCreationSuccessTitle": {
"message": "वॉलेट का निर्माण सफल हुआ"
},
"walletSeedRestore": {
"message": "वॉलेट का गुप्त रिकवरी फ्रेज़"
},
"web3ShimUsageNotification": {
"message": "हमने देखा है कि वर्तमान वेबसाइट ने हटाए गए window.web3 API का उपयोग करने की कोशिश की। यदि साइट में गड़बड़ी लगती है, तो कृपया अधिक जानकारी के लिए $1 पर क्लिक करें।",
"description": "$1 is a clickable link."
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/hr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,6 @@
"sendTokens": {
"message": "Pošalji tokene"
},
"separateEachWord": {
"message": "Odvojite pojedinačne riječi jednim razmakom"
},
"settings": {
"message": "Postavke"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/ht/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,6 @@
"sendTokens": {
"message": "Voye Tokens"
},
"separateEachWord": {
"message": "Separe chak mo ak yon sèl espas"
},
"settings": {
"message": "Paramèt"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/hu/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,6 @@
"sendTokens": {
"message": "Token küldése"
},
"separateEachWord": {
"message": "Minden egyes szavat szóközzel válasszon el"
},
"settings": {
"message": "Beállítások"
},
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/id/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2460,9 +2460,6 @@
"message": "Mengirim $1",
"description": "$1 represents the native currency symbol for the current network (e.g. ETH or BNB)"
},
"separateEachWord": {
"message": "Pisahkan setiap kata dengan satu spasi"
},
"setAdvancedPrivacySettings": {
"message": "Atur pengaturan privasi lanjutan"
},
Expand Down Expand Up @@ -3375,9 +3372,6 @@
"walletCreationSuccessTitle": {
"message": "Dompet berhasil dibuat"
},
"walletSeedRestore": {
"message": "Frasa Pemulihan Rahasia Dompet"
},
"web3ShimUsageNotification": {
"message": "Kami melihat situs web saat ini mencoba menggunakan API window.web3 yang dihapus. Jika situs tersebut tampak bermasalah, silakan klik $1 untuk informasi selengkapnya.",
"description": "$1 is a clickable link."
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/it/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1298,9 +1298,6 @@
"sendTokens": {
"message": "Invia Tokens"
},
"separateEachWord": {
"message": "Separa ogni parola con un solo spazio"
},
"settings": {
"message": "Impostazioni"
},
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/ja/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2460,9 +2460,6 @@
"message": "$1を送信中",
"description": "$1 represents the native currency symbol for the current network (e.g. ETH or BNB)"
},
"separateEachWord": {
"message": "単語ごとにスペースを 1 つ置いて分離します"
},
"setAdvancedPrivacySettings": {
"message": "高度なプライバシー設定を設定"
},
Expand Down Expand Up @@ -3375,9 +3372,6 @@
"walletCreationSuccessTitle": {
"message": "ウォレットが作成されました"
},
"walletSeedRestore": {
"message": "ウォレット シークレット リカバリー フレーズ"
},
"web3ShimUsageNotification": {
"message": "現在のウェブサイトが、削除済の window.web3 API の使用を検知しました。サイトが壊れているようであれば、$1 をクリックして詳細を確認してください。",
"description": "$1 is a clickable link."
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/kn/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,6 @@
"sendTokens": {
"message": "ಟೋಕನ್‌ಗಳನ್ನು ಕಳುಹಿಸಿ"
},
"separateEachWord": {
"message": "ಒಂದು ಸ್ಪೇಸ್ ಮೂಲಕ ಪ್ರತಿ ಪದವನ್ನು ಬೇರ್ಪಡಿಸಿ"
},
"settings": {
"message": "ಸೆಟ್ಟಿಂಗ್‌ಗಳು"
},
Expand Down
6 changes: 0 additions & 6 deletions app/_locales/ko/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2460,9 +2460,6 @@
"message": "$1 보내기",
"description": "$1 represents the native currency symbol for the current network (e.g. ETH or BNB)"
},
"separateEachWord": {
"message": "공백 한 칸으로 각 단어를 구분하세요."
},
"setAdvancedPrivacySettings": {
"message": "개인정보 설정 고급 지정"
},
Expand Down Expand Up @@ -3375,9 +3372,6 @@
"walletCreationSuccessTitle": {
"message": "지갑 생성 성공"
},
"walletSeedRestore": {
"message": "지갑 비밀 복구 구문"
},
"web3ShimUsageNotification": {
"message": "현재의 웹사이트가 제거된 window.web3 API를 이용하려고 합니다. 이 사이트가 제대로 작동하지 않는 경우, $1을(를) 클릭해 자세히 알아보세요.",
"description": "$1 is a clickable link."
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/lt/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,6 @@
"sendTokens": {
"message": "Siųsti žetonus"
},
"separateEachWord": {
"message": "Kiekvieną žodį atskirkite viengubu tarpu"
},
"settings": {
"message": "Nustatymai"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/lv/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -872,9 +872,6 @@
"sendTokens": {
"message": "Nosūtīt marķierus"
},
"separateEachWord": {
"message": "Atdaliet katru vārdu ar vienu atstarpi"
},
"settings": {
"message": "Iestatījumi"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/ms/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,6 @@
"sendTokens": {
"message": "Hantar Token"
},
"separateEachWord": {
"message": "Pisahkan setiap perkataan dengan ruang tunggal"
},
"settings": {
"message": "Tetapan"
},
Expand Down
3 changes: 0 additions & 3 deletions app/_locales/no/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,6 @@
"sendTokens": {
"message": "Send tokener"
},
"separateEachWord": {
"message": "Del hvert ord med et enkelt mellomrom "
},
"settings": {
"message": "Innstillinger"
},
Expand Down
Loading

0 comments on commit 429451d

Please sign in to comment.