From 65eb64cd07dcaf1b57405189fcd054684d3f5e2f Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 18 Mar 2022 17:52:46 -0300 Subject: mui text field, standard variation --- .../src/walletEntryPoint.tsx | 337 ++++++++++----------- 1 file changed, 166 insertions(+), 171 deletions(-) (limited to 'packages/taler-wallet-webextension/src/walletEntryPoint.tsx') diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx index a346df2c8..9a1d8699a 100644 --- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx +++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx @@ -73,7 +73,7 @@ function main(): void { } } -setupI18n("en-US", strings); +setupI18n("en", strings); if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", main); @@ -102,188 +102,183 @@ function Application(): VNode { return ( - {({ devMode }: { devMode: boolean }) => ( - - {/* won't work in the first render if is not called first */} - {/* https://github.com/preactjs/preact-router/issues/415 */} - - - {({ path }: { path: string }) => { - if (path && path.startsWith("/cta")) return; - return ( - - - - - ); - }} - -
+ {/* won't work in the first render if is not called first */} + {/* https://github.com/preactjs/preact-router/issues/415 */} + + + {({ path }: { path: string }) => { + if (path && path.startsWith("/cta")) return; + return ( + + + + + ); + }} + +
+ + route(Pages.balance_transaction.replace(":tid", txId)) + } + /> +
+ + {globalNotification && ( + +
{globalNotification}
+
+ )} + - - route(Pages.balance_transaction.replace(":tid", txId)) - } - /> -
- - {globalNotification && ( - -
{globalNotification}
-
- )} - - + - {/** - * BALANCE - */} + {/** + * BALANCE + */} - - route(Pages.balance_deposit.replace(":currency", currency)) - } - goToWalletManualWithdraw={(currency?: string) => - route( - Pages.balance_manual_withdraw.replace( - ":currency?", - currency || "", - ), - ) - } - /> - { - route( - Pages.balance_history.replace( - ":currency", - currency || "", - ), - ); - }} - /> + + route(Pages.balance_deposit.replace(":currency", currency)) + } + goToWalletManualWithdraw={(currency?: string) => + route( + Pages.balance_manual_withdraw.replace( + ":currency?", + currency || "", + ), + ) + } + /> + { + route( + Pages.balance_history.replace(":currency", currency || ""), + ); + }} + /> - { - route(Pages.balance); - }} - /> + { + route(Pages.balance); + }} + /> - { - route(Pages.balance_history.replace(":currency", currency)); - }} - onSuccess={(currency: string) => { - route(Pages.balance_history.replace(":currency", currency)); - setGlobalNotification( - - All done, your transaction is in progress - , - ); - }} - /> - {/** - * PENDING - */} - + { + route(Pages.balance_history.replace(":currency", currency)); + }} + onSuccess={(currency: string) => { + route(Pages.balance_history.replace(":currency", currency)); + setGlobalNotification( + + All done, your transaction is in progress + , + ); + }} + /> + {/** + * PENDING + */} + - {/** - * BACKUP - */} - { - route(Pages.backup_provider_add); - }} - /> - { - route(Pages.backup); - }} - /> - { - route(Pages.backup); - }} - /> + {/** + * BACKUP + */} + { + route(Pages.backup_provider_add); + }} + /> + { + route(Pages.backup); + }} + /> + { + route(Pages.backup); + }} + /> - {/** - * SETTINGS - */} - { - route(Pages.balance); - }} - /> + {/** + * SETTINGS + */} + { + route(Pages.balance); + }} + /> - {/** - * DEV - */} + {/** + * DEV + */} - + - {/** - * CALL TO ACTION - */} - - route( - Pages.balance_manual_withdraw.replace( - ":currency?", - currency || "", - ), - ) - } - goBack={() => route(Pages.balance)} - /> - - - + {/** + * CALL TO ACTION + */} + + route( + Pages.balance_manual_withdraw.replace( + ":currency?", + currency || "", + ), + ) + } + goBack={() => route(Pages.balance)} + /> + + + - {/** - * NOT FOUND - * all redirects should be at the end - */} - + {/** + * NOT FOUND + * all redirects should be at the end + */} + - - -
-
- )} + + + +
); -- cgit v1.2.3