diff options
author | Sebastian <sebasjm@gmail.com> | 2024-01-15 17:34:19 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-01-15 17:36:48 -0300 |
commit | 2e2cf4049a771c82fcc520686de3ace7603baa05 (patch) | |
tree | 620ab22d4fc0f621d0a574c8f98d1c49f1d67804 /packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx | |
parent | ef0bb60f23c0c755814f648b8d71a29a843e066c (diff) | |
download | wallet-core-2e2cf4049a771c82fcc520686de3ace7603baa05.tar.xz |
fixes #8083
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx index 748b65817..bd9f75696 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx @@ -21,7 +21,7 @@ import { Amount } from "../../components/Amount.js"; import { Part } from "../../components/Part.js"; import { QR } from "../../components/QR.js"; import { SelectList } from "../../components/SelectList.js"; -import { Input, LinkSuccess, SvgIcon } from "../../components/styled/index.js"; +import { Input, LinkSuccess, SvgIcon, WarningBox } from "../../components/styled/index.js"; import { TermsOfService } from "../../components/TermsOfService/index.js"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { Button } from "../../mui/Button.js"; @@ -35,6 +35,33 @@ import { State } from "./index.js"; import { Grid } from "../../mui/Grid.js"; import { AmountField } from "../../components/AmountField.js"; +export function FinalStateOperation(state: State.AlreadyCompleted): VNode { + const { i18n } = useTranslationContext(); + + switch (state.operationState) { + case "confirmed": return <WarningBox> + <div style={{ justifyContent: "center", lineHeight: "25px" }}> + <i18n.Translate>This operation has already been completed by another wallet.</i18n.Translate> + </div> + </WarningBox> + case "aborted": return <WarningBox> + <div style={{ justifyContent: "center", lineHeight: "25px" }}> + <i18n.Translate>This operation has already been aborted</i18n.Translate> + </div> + </WarningBox> + case "selected": return <WarningBox> + <div style={{ justifyContent: "center", lineHeight: "25px" }}> + <i18n.Translate>This operation has already been used by another wallet.</i18n.Translate> + </div> + <div style={{ justifyContent: "center", lineHeight: "25px" }}> + <i18n.Translate>It can be confirmed in</i18n.Translate> <a target="_bank" rel="noreferrer" href={state.confirmTransferUrl}> + <i18n.Translate>this page</i18n.Translate> + </a> + </div> + </WarningBox> + } +} + export function SuccessView(state: State.Success): VNode { const { i18n } = useTranslationContext(); // const currentTosVersionIsAccepted = |