From a5406c5a5dc437e036168eb068db11d88e05bb0f Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 19 Sep 2023 08:31:08 -0300 Subject: some ui --- packages/demobank-ui/src/pages/BankFrame.tsx | 266 +++++++++++++++++++-------- 1 file changed, 190 insertions(+), 76 deletions(-) (limited to 'packages/demobank-ui/src/pages/BankFrame.tsx') diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx b/packages/demobank-ui/src/pages/BankFrame.tsx index dc61f1302..5b6d95ade 100644 --- a/packages/demobank-ui/src/pages/BankFrame.tsx +++ b/packages/demobank-ui/src/pages/BankFrame.tsx @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see */ -import { Logger, TranslatedString } from "@gnu-taler/taler-util"; +import { Logger, PaytoUriIBAN, TranslatedString, parsePaytoUri, stringifyPaytoUri } from "@gnu-taler/taler-util"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { ComponentChildren, Fragment, h, VNode } from "preact"; import { StateUpdater, useEffect, useState } from "preact/hooks"; @@ -25,6 +25,7 @@ import { useBusinessAccountDetails } from "../hooks/circuit.js"; import { bankUiSettings } from "../settings.js"; import { useSettings } from "../hooks/settings.js"; import { ErrorMessage, onNotificationUpdate } from "../hooks/notification.js"; +import { CopyButton, CopyIcon } from "../components/CopyButton.js"; const IS_PUBLIC_ACCOUNT_ENABLED = false; const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ : undefined; @@ -70,6 +71,7 @@ export function BankFrame({ const { i18n } = useTranslationContext(); const backend = useBackendContext(); const [settings, updateSettings] = useSettings(); + const [open, setOpen] = useState(false) const demo_sites = []; for (const i in bankUiSettings.demoSites) @@ -79,83 +81,165 @@ export function BankFrame({ , ); - return ( - -
- -
-

- - {bankUiSettings.bankName} - -

- {maybeDemoContent( -

- {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. - - )} -

, - )} + return (
+
+
- -
- - {children} -
- -
+ + + +
+
+
+ {/* */} + {children} +
+
+
+ +