From a2890a2c90fd59eb9987fce54a4d68b66c5ee438 Mon Sep 17 00:00:00 2001 From: soaresa <10797037+soaresa@users.noreply.github.com> Date: Fri, 14 Jun 2024 07:11:29 -0300 Subject: [PATCH] fixes set slow wallet modal and improve its texts --- src/components/txs/SetWalletType.svelte | 49 ++++++++++++++++++++----- src/lang/locales/ar.json | 21 +++++++---- src/lang/locales/de.json | 34 +++++++++++------ src/lang/locales/en.json | 16 +++++++- src/lang/locales/es.json | 21 +++++++---- src/lang/locales/fr.json | 34 +++++++++++------ src/lang/locales/it.json | 34 +++++++++++------ src/lang/locales/pt.json | 30 ++++++++++----- src/lang/locales/zh_cn.json | 26 +++++++++---- 9 files changed, 191 insertions(+), 74 deletions(-) diff --git a/src/components/txs/SetWalletType.svelte b/src/components/txs/SetWalletType.svelte index 6eefba36..67326c26 100644 --- a/src/components/txs/SetWalletType.svelte +++ b/src/components/txs/SetWalletType.svelte @@ -9,6 +9,11 @@ export let signingAccount; let loading = false; let isSlowWallet = false; + let confirmationModal + + onMount(() => { + confirmationModal = UIkit.modal('#set-slow-wallet-confirmation-modal') + }) const checkIsSlowWallet = async () => { if (signingAccount && signingAccount.account) { @@ -16,14 +21,18 @@ } }; + const openSlowModal = () => { + confirmationModal && confirmationModal.show(); + }; + const setWallet = (wtype: WalletType) => { loading = true; setWalletType(wtype) .finally(() => { loading = false; checkIsSlowWallet(); // Recheck the slow wallet status after setting the wallet type + confirmationModal.hide(); }); - UIkit.modal('.wallet-modal').hide(); }; // Run checkIsSlowWallet when the component mounts @@ -57,8 +66,8 @@ @@ -74,14 +83,36 @@ -
+
-

- {$_('txs.set_wallet_type.warning')} -

- +
+

+ {$_('txs.set_wallet_type.modal.title')} +

+

{$_("txs.set_wallet_type.modal.body.question")}

+ {$signingAccount.account} +

{$_("txs.set_wallet_type.modal.body.review_list.title")}

+
    +
  • {@html $_("txs.set_wallet_type.modal.body.review_list.item1")}
  • +
  • {@html $_("txs.set_wallet_type.modal.body.review_list.item2")}
  • +
  • {@html $_("txs.set_wallet_type.modal.body.review_list.item3")}
  • +
+
+
+ + +
{/if} diff --git a/src/lang/locales/ar.json b/src/lang/locales/ar.json index 2f14fd73..cc86905b 100644 --- a/src/lang/locales/ar.json +++ b/src/lang/locales/ar.json @@ -306,13 +306,20 @@ "set_slow_title": "Make Slow Wallet (danger)", "subtitle": "Be sure you know what you are doing. This is not reversible. Slow and Community wallets are permanent.", "btn_slow": "Set Slow Wallet", - "btn_confirm_slow": "Confirm Set Slow Wallet? This is not reversible", - "warning": "Warning: this change is forever", - "btn_community": "Set Community Wallet", - "btn_confirm_community": "Set Community", - "community_confirm": "Confirm Set Community Wallet? This is not reversible", - "title": "Set your Account Type", - "slow_confirm": "Set Slow" + "modal": { + "title": "Warning: this change is forever", + "body": { + "question": "Are you sure you want to set this account as a slow wallet?", + "review_list": { + "title": "Please review the following before proceeding:", + "item1": "This operation is not reversible. After setting your wallet to slow you can't change it back.", + "item2": "This action will set the wallet to slow on the blockchain and will change your account liquidity.", + "item3": "Slow wallets have a daily unlock limit of 35,000 coins from the account balance." + } + }, + "btn_confirm": "Confirm Set Slow Wallet? This is not reversible", + "btn_cancel": "Cancel" + } }, "transfer": { "title": "Coin Transfer", diff --git a/src/lang/locales/de.json b/src/lang/locales/de.json index 61ff8f34..97247e7b 100644 --- a/src/lang/locales/de.json +++ b/src/lang/locales/de.json @@ -302,17 +302,29 @@ "no_balance_body2": "Sieht so aus, als hättest du weniger als 2 Coins auf deinem Konto, das bedeutet, dass du niemanden onboarden kannst." }, "set_wallet_type": { - "actions_title": "Konto-Aktionen", - "set_slow_title": "Slow Wallet machen (Gefahr)", - "subtitle": " Es ist wichtig, dass du weißt, was du tust. Dies kann nicht mehr rückgängig gemacht werden. Slow und Community Wallets sind unveränderlich.", - "btn_slow": "Slow Wallet Wählen", - "btn_confirm_slow": "Slow Wallet bestätigen? Dies kann nicht rückgängig gemacht werden.", - "warning": "Warnung: Diese Änderung ist für immer", - "btn_community": "Community Wallet Wählen", - "btn_confirm_community": "Community Wählen", - "community_confirm": "Community Wallet bestätigen? Dies kann nicht rückgängig gemacht werden.", - "title": "Kontotyp Auswählen", - "slow_confirm": "Slow Wählen" + "actions_title": "Kontohandlungen", + "set_slow_title": "Langsame Wallet erstellen (gefährlich)", + "subtitle": "Stellen Sie sicher, dass Sie wissen, was Sie tun. Dies ist nicht umkehrbar. Langsame und Community-Wallets sind dauerhaft.", + "btn_slow": "Langsame Wallet setzen", + "modal": { + "title": "Warnung: Diese Änderung ist für immer", + "body": { + "question": "Sind Sie sicher, dass Sie dieses Konto als langsame Wallet festlegen möchten?", + "review_list": { + "title": "Bitte überprüfen Sie die folgenden Punkte, bevor Sie fortfahren:", + "item1": "Dieser Vorgang ist nicht umkehrbar. Nachdem Sie Ihre Wallet auf langsam gesetzt haben, können Sie dies nicht mehr ändern.", + "item2": "Diese Aktion wird die Wallet auf der Blockchain als langsam festlegen und Ihre Kontoliquidität ändern.", + "item3": "Langsame Wallets haben ein tägliches Freischaltungslimit von 35.000 Münzen vom Kontostand." + } + }, + "btn_confirm": "Bestätigen Sie das Setzen der langsamen Wallet? Dies ist nicht umkehrbar", + "btn_cancel": "Abbrechen" + }, + "btn_community": "Community Wallet setzen", + "btn_confirm_community": "Community setzen", + "community_confirm": "Bestätigen Sie das Setzen der Community Wallet? Dies ist nicht umkehrbar", + "title": "Legen Sie Ihren Kontotyp fest", + "slow_confirm": "Langsam setzen" }, "transfer": { "title": "Überweisung von Coins", diff --git a/src/lang/locales/en.json b/src/lang/locales/en.json index 2f14fd73..53a15d82 100644 --- a/src/lang/locales/en.json +++ b/src/lang/locales/en.json @@ -306,8 +306,20 @@ "set_slow_title": "Make Slow Wallet (danger)", "subtitle": "Be sure you know what you are doing. This is not reversible. Slow and Community wallets are permanent.", "btn_slow": "Set Slow Wallet", - "btn_confirm_slow": "Confirm Set Slow Wallet? This is not reversible", - "warning": "Warning: this change is forever", + "modal": { + "title": "Warning: this change is forever", + "body": { + "question": "Are you sure you want to set this account as a slow wallet?", + "review_list": { + "title": "Please review the following before proceeding:", + "item1": "This operation is not reversible. After setting your wallet to slow you can't change it back.", + "item2": "This action will set the wallet to slow on the blockchain and will change your account liquidity.", + "item3": "Slow wallets have a daily unlock limit of 35,000 coins from the account balance." + } + }, + "btn_confirm": "Confirm Set Slow Wallet? This is not reversible", + "btn_cancel": "Cancel" + }, "btn_community": "Set Community Wallet", "btn_confirm_community": "Set Community", "community_confirm": "Confirm Set Community Wallet? This is not reversible", diff --git a/src/lang/locales/es.json b/src/lang/locales/es.json index 2f14fd73..cc86905b 100644 --- a/src/lang/locales/es.json +++ b/src/lang/locales/es.json @@ -306,13 +306,20 @@ "set_slow_title": "Make Slow Wallet (danger)", "subtitle": "Be sure you know what you are doing. This is not reversible. Slow and Community wallets are permanent.", "btn_slow": "Set Slow Wallet", - "btn_confirm_slow": "Confirm Set Slow Wallet? This is not reversible", - "warning": "Warning: this change is forever", - "btn_community": "Set Community Wallet", - "btn_confirm_community": "Set Community", - "community_confirm": "Confirm Set Community Wallet? This is not reversible", - "title": "Set your Account Type", - "slow_confirm": "Set Slow" + "modal": { + "title": "Warning: this change is forever", + "body": { + "question": "Are you sure you want to set this account as a slow wallet?", + "review_list": { + "title": "Please review the following before proceeding:", + "item1": "This operation is not reversible. After setting your wallet to slow you can't change it back.", + "item2": "This action will set the wallet to slow on the blockchain and will change your account liquidity.", + "item3": "Slow wallets have a daily unlock limit of 35,000 coins from the account balance." + } + }, + "btn_confirm": "Confirm Set Slow Wallet? This is not reversible", + "btn_cancel": "Cancel" + } }, "transfer": { "title": "Coin Transfer", diff --git a/src/lang/locales/fr.json b/src/lang/locales/fr.json index 06d72e25..527b2970 100644 --- a/src/lang/locales/fr.json +++ b/src/lang/locales/fr.json @@ -302,17 +302,29 @@ "no_balance_body2": "Vous avez moins de deux Coins sur votre compte, vous ne pouvez donc pas onboarder d'autres comptes." }, "set_wallet_type": { - "actions_title": "Actions sur le compte", - "set_slow_title": "Faire du portefeuille lent (danger)", - "subtitle": " Soyez sûr de vous, cette opération est irreversible! Les portefeuilles \"Slow\" et \"Community\" sont permanents.", - "btn_slow": "Changer en \"Slow\"", - "btn_confirm_slow": "Confirmez le passage en \"Slow\"? Cet opération est irreversible.", - "warning": "Avertissement : ce changement est définitif", - "btn_community": "Changer en \"Community\"", - "btn_confirm_community": "Changer en \"Community\"", - "community_confirm": "Confirmez le passage en \"Community\"? Cet opération est irreversible", - "title": "Modifier le type de compte", - "slow_confirm": "Changer en \"Slow\"" + "actions_title": "Actions du compte", + "set_slow_title": "Rendre le portefeuille lent (dangereux)", + "subtitle": "Assurez-vous de savoir ce que vous faites. Ce n'est pas réversible. Les portefeuilles lents et communautaires sont permanents.", + "btn_slow": "Définir le portefeuille lent", + "modal": { + "title": "Attention : ce changement est définitif", + "body": { + "question": "Êtes-vous sûr de vouloir définir ce compte comme un portefeuille lent?", + "review_list": { + "title": "Veuillez examiner les points suivants avant de continuer:", + "item1": "Cette opération est irréversible. Après avoir défini votre portefeuille sur lent, vous ne pouvez plus revenir en arrière.", + "item2": "Cette action définira le portefeuille comme lent sur la blockchain et modifiera la liquidité de votre compte.", + "item3": "Les portefeuilles lents ont une limite de déblocage quotidienne de 35 000 pièces du solde du compte." + } + }, + "btn_confirm": "Confirmer le portefeuille lent? Ce n'est pas réversible", + "btn_cancel": "Annuler" + }, + "btn_community": "Définir le portefeuille communautaire", + "btn_confirm_community": "Définir la communauté", + "community_confirm": "Confirmer le portefeuille communautaire? Ce n'est pas réversible", + "title": "Définissez votre type de compte", + "slow_confirm": "Définir lent" }, "transfer": { "title": "Transfert de Coins", diff --git a/src/lang/locales/it.json b/src/lang/locales/it.json index 47cee44d..bb614bd6 100644 --- a/src/lang/locales/it.json +++ b/src/lang/locales/it.json @@ -302,17 +302,29 @@ "no_balance_body2": "Looks like you have less than 2 coins in your account, this means you won't be able to onboard anyone." }, "set_wallet_type": { - "actions_title": "Account Actions", - "set_slow_title": "Make Slow Wallet (danger)", - "subtitle": " Make sure you know what you are doing. This is not reversible. Slow and Community wallets are permanent.", - "btn_slow": "Set Slow Wallet", - "btn_confirm_slow": "Confirm Set Slow Wallet? This is not reversable.", - "warning": "Warning: this change is forever", - "btn_community": "Set Community Wallet", - "btn_confirm_community": "Set Community", - "community_confirm": "Confirm Set Community Wallet? This is not reversable.", - "title": "Set your Account Type", - "slow_confirm": "Set Slow" + "actions_title": "Azioni dell'account", + "set_slow_title": "Rendere il portafoglio lento (pericoloso)", + "subtitle": "Assicurati di sapere cosa stai facendo. Questo non è reversibile. I portafogli lenti e comunitari sono permanenti.", + "btn_slow": "Imposta portafoglio lento", + "modal": { + "title": "Avviso: questa modifica è permanente", + "body": { + "question": "Sei sicuro di voler impostare questo account come portafoglio lento?", + "review_list": { + "title": "Si prega di rivedere quanto segue prima di procedere:", + "item1": "Questa operazione non è reversibile. Dopo aver impostato il portafoglio su lento, non è possibile tornare indietro.", + "item2": "Questa azione imposterà il portafoglio come lento sulla blockchain e cambierà la liquidità del tuo account.", + "item3": "I portafogli lenti hanno un limite di sblocco giornaliero di 35.000 monete dal saldo del conto." + } + }, + "btn_confirm": "Confermare l'impostazione del portafoglio lento? Questo non è reversibile", + "btn_cancel": "Annulla" + }, + "btn_community": "Imposta portafoglio comunitario", + "btn_confirm_community": "Imposta comunità", + "community_confirm": "Confermare l'impostazione del portafoglio comunitario? Questo non è reversibile", + "title": "Imposta il tipo di account", + "slow_confirm": "Imposta lento" }, "transfer": { "title": "Coin Transfer", diff --git a/src/lang/locales/pt.json b/src/lang/locales/pt.json index ef1810a9..6354dad1 100644 --- a/src/lang/locales/pt.json +++ b/src/lang/locales/pt.json @@ -285,17 +285,29 @@ "no_balance_body2": "Parece que você tem menos de 2 moedas em sua conta, isso significa que você não poderá embarcar ninguém." }, "set_wallet_type": { - "actions_title": "Acções da conta", - "set_slow_title": "Fazer carteira lenta (perigo)", - "subtitle": "Certifique-se de que você sabe o que está fazendo. Essa operação não é reversível. As carteiras lentas e comunitárias são permanentes.", + "actions_title": "Ações da Conta", + "set_slow_title": "Tornar Carteira Lenta (perigoso)", + "subtitle": "Certifique-se de que você sabe o que está fazendo. Isso não é reversível. Carteiras Lentas e Comunitárias são permanentes.", "btn_slow": "Definir Carteira Lenta", - "btn_confirm_slow": "Confirmar Definir Carteira Lenta? Esta operação não é reversível.", - "warning": "Aviso: esta mudança é para sempre", - "btn_community": "Definir Carteira de Comunidade", + "modal": { + "title": "Aviso: esta alteração é permanente", + "body": { + "question": "Tem certeza de que deseja definir esta conta como uma carteira lenta?", + "review_list": { + "title": "Revise o seguinte antes de prosseguir:", + "item1": "Esta operação não é reversível. Depois de definir sua carteira como lenta, você não poderá alterar de volta.", + "item2": "Esta ação definirá a carteira como lenta na blockchain e mudará a liquidez da sua conta.", + "item3": "Carteiras lentas têm um limite diário de desbloqueio de 35.000 moedas do saldo da conta." + } + }, + "btn_confirm": "Confirmar definição de Carteira Lenta? Isso não é reversível", + "btn_cancel": "Cancelar" + }, + "btn_community": "Definir Carteira Comunitária", "btn_confirm_community": "Definir Comunidade", - "community_confirm": "Confirmar Definir Carteira de Comunidade? Esta operação não é reversível.", - "title": "Defina seu Tipo de Conta", - "slow_confirm": "Definir Lenta" + "community_confirm": "Confirmar definição de Carteira Comunitária? Isso não é reversível", + "title": "Defina o Tipo da Sua Conta", + "slow_confirm": "Definir Lento" }, "transfer": { "title": "Transferência de Moedas", diff --git a/src/lang/locales/zh_cn.json b/src/lang/locales/zh_cn.json index d6024cd5..288240ec 100644 --- a/src/lang/locales/zh_cn.json +++ b/src/lang/locales/zh_cn.json @@ -303,15 +303,27 @@ }, "set_wallet_type": { "actions_title": "账户操作", - "set_slow_title": "慢速钱包(危险)", - "subtitle": "确认您务必确认本次操作. 本操作不可逆. 慢钱包和社区钱包是永久性的。", + "set_slow_title": "设为慢钱包(危险)", + "subtitle": "确保你知道自己在做什么。这是不可逆的。慢钱包和社区钱包是永久性的。", "btn_slow": "设为慢钱包", - "btn_confirm_slow": "确认设置慢钱包吗?本操作不可逆。", - "warning": "警告:这一改变将是永久性的", + "modal": { + "title": "警告:此更改是永久性的", + "body": { + "question": "你确定要将此账户设为慢钱包吗?", + "review_list": { + "title": "在继续之前请检查以下内容:", + "item1": "此操作不可逆。将钱包设为慢钱包后,无法更改回去。", + "item2": "此操作将在区块链上将钱包设为慢钱包,并将改变你的账户流动性。", + "item3": "慢钱包每天的解锁限额为35,000枚硬币。" + } + }, + "btn_confirm": "确认设为慢钱包?这不可逆", + "btn_cancel": "取消" + }, "btn_community": "设为社区钱包", - "btn_confirm_community": "设为社区钱包", - "community_confirm": "确认要设为社区钱包吗?本操作不可逆。", - "title": "设置账户类型", + "btn_confirm_community": "设为社区", + "community_confirm": "确认设为社区钱包?这不可逆", + "title": "设置你的账户类型", "slow_confirm": "设为慢钱包" }, "transfer": {