From a5406c5a5dc437e036168eb068db11d88e05bb0f Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 19 Sep 2023 08:31:08 -0300 Subject: some ui --- .../demobank-ui/src/pages/AccountPage/views.tsx | 93 ++++++++++++---------- 1 file changed, 53 insertions(+), 40 deletions(-) (limited to 'packages/demobank-ui/src/pages/AccountPage/views.tsx') diff --git a/packages/demobank-ui/src/pages/AccountPage/views.tsx b/packages/demobank-ui/src/pages/AccountPage/views.tsx index b476759b4..f2cbbba6c 100644 --- a/packages/demobank-ui/src/pages/AccountPage/views.tsx +++ b/packages/demobank-ui/src/pages/AccountPage/views.tsx @@ -21,54 +21,67 @@ import { Transactions } from "../../components/Transactions/index.js"; import { PaymentOptions } from "../PaymentOptions.js"; import { State } from "./index.js"; import { CopyButton } from "../../components/CopyButton.js"; +import { bankUiSettings } from "../../settings.js"; -export function InvalidIbanView({error}:State.InvalidIban) { - return ( -
Payto from server is not valid "{error.data.paytoUri}"
- ); +export function InvalidIbanView({ error }: State.InvalidIban) { + return ( +
Payto from server is not valid "{error.data.paytoUri}"
+ ); } -export function ReadyView({ account, balance, balanceIsDebit, limit, payto }: State.Ready): VNode<{}> { +const IS_PUBLIC_ACCOUNT_ENABLED = false + +function ImportantMessage(): VNode { const { i18n } = useTranslationContext(); - return -
-

- - Welcome, {account} ({payto.iban})! stringifyPaytoUri(payto)} /> - -

-
+ return
+
+
+
+
+
+

+ + Welcome, "account" + -

-
-

{i18n.str`Bank account balance`}

- {!balance ? ( -
- Waiting server response... +

+

+ {bankUiSettings.showDemoNav && +

+ {IS_PUBLIC_ACCOUNT_ENABLED ? ( + + This part of the demo shows how a bank that supports Taler + directly would work. In addition to using your own bank + account, you can also see the transaction history of some{" "} + Public Accounts. + + ) : ( + + This part of the demo shows how a bank that supports Taler + directly would work. + + )} +

+ }

+
- ) : ( -
- {balanceIsDebit ? - : null} - {`${Amounts.stringifyValue(balance)}`} -   - {`${balance.currency}`} -
- )} -
- -
-
-

{i18n.str`Payments`}

- +
+
+ +
- +
+
-
-
-

{i18n.str`Latest transactions`}

- -
-
+} + +export function ReadyView({ account, balance, balanceIsDebit, limit, payto }: State.Ready): VNode<{}> { + const { i18n } = useTranslationContext(); + return + + ; } -- cgit v1.2.3