From 4853f796776aab39b5cd5b652df219c5092b0f46 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 29 Jun 2023 00:10:04 -0300 Subject: fix: #7875 - show retry on pending state --- .../src/wallet/Transaction.tsx | 38 ++++++++++++---------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet') diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index fbd6f6ea4..e164a28c5 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -43,14 +43,14 @@ import { import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { styled } from "@linaria/react"; -import { differenceInSeconds, isPast } from "date-fns"; +import { isPast } from "date-fns"; import { ComponentChildren, Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; import emptyImg from "../../static/img/empty.png"; import { Amount } from "../components/Amount.js"; import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType.js"; -import { CopyButton } from "../components/CopyButton.js"; import { AlertView, ErrorAlertView } from "../components/CurrentAlerts.js"; +import { EnabledBySettings } from "../components/EnabledBySettings.js"; import { Loading } from "../components/Loading.js"; import { Kind, Part, PartCollapsible, PartPayto } from "../components/Part.js"; import { QR } from "../components/QR.js"; @@ -59,24 +59,29 @@ import { CenteredDialog, ErrorBox, InfoBox, + Link, ListOfProducts, Overlay, Row, SmallLightText, SubTitle, - SuccessBox, + SvgIcon, WarningBox, } from "../components/styled/index.js"; import { Time } from "../components/Time.js"; import { alertFromError, useAlertContext } from "../context/alert.js"; import { useBackendContext } from "../context/backend.js"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; +import { useSettings } from "../hooks/useSettings.js"; import { Button } from "../mui/Button.js"; import { SafeHandler } from "../mui/handlers.js"; import { Pages } from "../NavigationBar.js"; import { assertUnreachable } from "../utils/index.js"; -import { EnabledBySettings } from "../components/EnabledBySettings.js"; -import { useSettings } from "../hooks/useSettings.js"; +import refreshIcon from "../svg/refresh_24px.inline.svg"; +import refreshIcon1 from "../svg/refresh_outlined_24px.inline.svg"; +import refreshIcon2 from "../svg/refresh_rounded_24px.inline.svg"; +import refreshIcon3 from "../svg/refresh_sharp_24px.inline.svg"; +import refreshIcon4 from "../svg/refresh_two_tone_24px.inline.svg"; interface Props { tid: string; @@ -271,7 +276,16 @@ function TransactionTemplate({ )} {transaction.txState.major === TransactionMajorState.Pending && ( - This transaction is not completed +
+ This transaction is not completed + + + +
)} {transaction.txState.major === TransactionMajorState.Aborted && ( @@ -360,14 +374,6 @@ function TransactionTemplate({