aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx21
1 files changed, 19 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx
index ebb15e75c..3de36b6e9 100644
--- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx
+++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/views.tsx
@@ -15,6 +15,7 @@
*/
import { h, VNode } from "preact";
+import { ErrorTalerOperation } from "../../components/ErrorTalerOperation.js";
import { LoadingError } from "../../components/LoadingError.js";
import { LogoHeader } from "../../components/LogoHeader.js";
import { Part } from "../../components/Part.js";
@@ -44,7 +45,7 @@ export function LoadingUriView({ error }: State.LoadingUriError): VNode {
);
}
-export function ShowQrView({ talerUri, close }: State.ShowQr): VNode {
+export function ShowQrView({ talerUri, cancel }: State.ShowQr): VNode {
const { i18n } = useTranslationContext();
return (
<WalletAction>
@@ -57,7 +58,7 @@ export function ShowQrView({ talerUri, close }: State.ShowQr): VNode {
<QR text={talerUri} />
</section>
<section>
- <Link upperCased onClick={close}>
+ <Link upperCased onClick={cancel.onClick}>
<i18n.Translate>Close</i18n.Translate>
</Link>
</section>
@@ -70,6 +71,7 @@ export function ReadyView({
exchangeUrl,
subject,
showQr,
+ cancel,
operationError,
copyToClipboard,
toBeReceived,
@@ -83,6 +85,16 @@ export function ReadyView({
<SubTitle>
<i18n.Translate>Digital invoice</i18n.Translate>
</SubTitle>
+ {operationError && (
+ <ErrorTalerOperation
+ title={
+ <i18n.Translate>
+ Could not finish the invoice creation
+ </i18n.Translate>
+ }
+ error={operationError}
+ />
+ )}
<section style={{ textAlign: "left" }}>
<TextField
label="Subject"
@@ -145,6 +157,11 @@ export function ReadyView({
</Grid>
</Grid>
</section>
+ <section>
+ <Link upperCased onClick={cancel.onClick}>
+ <i18n.Translate>Cancel</i18n.Translate>
+ </Link>
+ </section>
</WalletAction>
);
}