diff options
author | Sebastian <sebasjm@gmail.com> | 2021-11-19 14:51:27 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-11-19 14:51:35 -0300 |
commit | a35604fd562a72e4e266bf6a4255d89d3c1374a1 (patch) | |
tree | d0c4df01a89dc78c412be6da3aba3cec343937ff /packages/taler-wallet-webextension/src/wallet/BackupPage.tsx | |
parent | 60cfb0e78f3afed92f315c1394da717329db9564 (diff) | |
download | wallet-core-a35604fd562a72e4e266bf6a4255d89d3c1374a1.tar.xz |
some changes:
- simplify design to reuse more components (from wallet instead of popup)
- simplify hooks (useAsyncAsHook)
- updateNotification from backend now filter events by type
- new balance design proposed by Belen
- more information when the withdrawal is in process
- manual withdrawal implementation
- some bugs killed
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/BackupPage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/BackupPage.tsx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx index f0ae38e0f..0b0af25ab 100644 --- a/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/BackupPage.tsx @@ -35,7 +35,6 @@ import { RowBorderGray, SmallLightText, SmallText, - WalletBox, } from "../components/styled"; import { useBackupStatus } from "../hooks/useBackupStatus"; import { Pages } from "../NavigationBar"; @@ -70,7 +69,7 @@ export function BackupView({ onSyncAll, }: ViewProps): VNode { return ( - <WalletBox> + <Fragment> <section> {providers.map((provider, idx) => ( <BackupLayout @@ -106,7 +105,7 @@ export function BackupView({ </div> </footer> )} - </WalletBox> + </Fragment> ); } @@ -155,7 +154,7 @@ function BackupLayout(props: TransactionLayoutProps): VNode { ); } -function ExpirationText({ until }: { until: Timestamp }) { +function ExpirationText({ until }: { until: Timestamp }): VNode { return ( <Fragment> <CenteredText> Expires in </CenteredText> @@ -167,14 +166,14 @@ function ExpirationText({ until }: { until: Timestamp }) { ); } -function colorByTimeToExpire(d: Timestamp) { +function colorByTimeToExpire(d: Timestamp): string { if (d.t_ms === "never") return "rgb(28, 184, 65)"; const months = differenceInMonths(d.t_ms, new Date()); return months > 1 ? "rgb(28, 184, 65)" : "rgb(223, 117, 20)"; } -function daysUntil(d: Timestamp) { - if (d.t_ms === "never") return undefined; +function daysUntil(d: Timestamp): string { + if (d.t_ms === "never") return ""; const duration = intervalToDuration({ start: d.t_ms, end: new Date(), |