diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Application.tsx | 9 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx index 31a71e249..13afccb6c 100644 --- a/packages/taler-wallet-webextension/src/wallet/Application.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx @@ -44,6 +44,7 @@ import { LogoHeader } from "../components/LogoHeader.js"; import PendingTransactions from "../components/PendingTransactions.js"; import { LinkPrimary, + RedBanner, SubTitle, WalletAction, WalletBox, @@ -80,6 +81,7 @@ import { QrReaderPage } from "./QrReader.js"; import { SettingsPage } from "./Settings.js"; import { TransactionPage } from "./Transaction.js"; import { WelcomePage } from "./Welcome.js"; +import { useIsOnline } from "../hooks/useIsOnline.js"; export function Application(): VNode { const { i18n } = useTranslationContext(); @@ -585,8 +587,15 @@ function WalletTemplate({ children: ComponentChildren; goToTransaction?: (id: string) => Promise<void>; }): VNode { + const online = useIsOnline(); + const { i18n } = useTranslationContext(); return ( <Fragment> + {!online && ( + <div style={{ display: "flex", justifyContent: "center" }}> + <RedBanner>{i18n.str`Network is offline`}</RedBanner> + </div> + )} <LogoHeader /> <WalletNavBar path={path} /> {goToTransaction ? ( diff --git a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx index 388a331e6..c5e5c3c07 100644 --- a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx @@ -47,8 +47,6 @@ export function DeveloperPage(): VNode { const [status, timedOut] = useDiagnostics(); const listenAllEvents = Array.from<NotificationType>({ length: 1 }); - //FIXME: waiting for retry notification make a always increasing loop of notifications - listenAllEvents.includes = (e) => e !== "waiting-for-retry"; // includes every event const api = useBackendContext(); @@ -405,7 +403,9 @@ export function View({ <i18n.Translate> Database exported at <Time - timestamp={AbsoluteTime.fromMilliseconds(downloadedDatabase.time.getTime())} + timestamp={AbsoluteTime.fromMilliseconds( + downloadedDatabase.time.getTime(), + )} format="yyyy/MM/dd HH:mm:ss" /> <a |