From a994009d2f094c4d9c12da68dac3abb28bdef4b3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 16 Nov 2021 13:59:53 -0300 Subject: reserveCreated new design --- .../src/components/Diagnostics.tsx | 75 ++++++++++------------ 1 file changed, 35 insertions(+), 40 deletions(-) (limited to 'packages/taler-wallet-webextension/src/components/Diagnostics.tsx') diff --git a/packages/taler-wallet-webextension/src/components/Diagnostics.tsx b/packages/taler-wallet-webextension/src/components/Diagnostics.tsx index 0f8afd525..d368a10bf 100644 --- a/packages/taler-wallet-webextension/src/components/Diagnostics.tsx +++ b/packages/taler-wallet-webextension/src/components/Diagnostics.tsx @@ -15,8 +15,7 @@ */ import { WalletDiagnostics } from "@gnu-taler/taler-util"; -import { h } from "preact"; -import { JSX } from "preact/jsx-runtime"; +import { Fragment, h, VNode } from "preact"; import { PageLink } from "../renderHtml"; interface Props { @@ -24,51 +23,47 @@ interface Props { diagnostics: WalletDiagnostics | undefined; } -export function Diagnostics({ - timedOut, - diagnostics, -}: Props): JSX.Element | null { +export function Diagnostics({ timedOut, diagnostics }: Props): VNode { if (timedOut) { return

Diagnostics timed out. Could not talk to the wallet backend.

; } if (diagnostics) { if (diagnostics.errors.length === 0) { - return null; - } else { - return ( -
-

Problems detected:

-
    - {diagnostics.errors.map((errMsg) => ( -
  1. {errMsg}
  2. - ))} -
- {diagnostics.firefoxIdbProblem ? ( -

- Please check in your about:config settings that you - have IndexedDB enabled (check the preference name{" "} - dom.indexedDB.enabled). -

- ) : null} - {diagnostics.dbOutdated ? ( -

- Your wallet database is outdated. Currently automatic migration is - not supported. Please go{" "} - here to reset the - wallet database. -

- ) : null} -
- ); + return ; } + return ( +
+

Problems detected:

+
    + {diagnostics.errors.map((errMsg) => ( +
  1. {errMsg}
  2. + ))} +
+ {diagnostics.firefoxIdbProblem ? ( +

+ Please check in your about:config settings that you + have IndexedDB enabled (check the preference name{" "} + dom.indexedDB.enabled). +

+ ) : null} + {diagnostics.dbOutdated ? ( +

+ Your wallet database is outdated. Currently automatic migration is + not supported. Please go{" "} + here to reset the + wallet database. +

+ ) : null} +
+ ); } return

Running diagnostics ...

; -- cgit v1.2.3