From a35604fd562a72e4e266bf6a4255d89d3c1374a1 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 19 Nov 2021 14:51:27 -0300 Subject: 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 --- .../src/walletEntryPoint.tsx | 46 ++++++++++++++++------ 1 file changed, 35 insertions(+), 11 deletions(-) (limited to 'packages/taler-wallet-webextension/src/walletEntryPoint.tsx') diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx index f097d58b5..a17550ff9 100644 --- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx +++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx @@ -22,7 +22,7 @@ import { setupI18n } from "@gnu-taler/taler-util"; import { createHashHistory } from "history"; -import { Fragment, h, render } from "preact"; +import { Fragment, h, render, VNode } from "preact"; import Router, { route, Route } from "preact-router"; import { useEffect } from "preact/hooks"; import { LogoHeader } from "./components/LogoHeader"; @@ -39,8 +39,11 @@ import { SettingsPage } from "./wallet/Settings"; import { TransactionPage } from "./wallet/Transaction"; import { WelcomePage } from "./wallet/Welcome"; import { BackupPage } from "./wallet/BackupPage"; -import { DeveloperPage } from "./popup/Debug.js"; -import { ManualWithdrawPage } from "./wallet/ManualWithdrawPage.js"; +import { DeveloperPage } from "./popup/Debug"; +import { ManualWithdrawPage } from "./wallet/ManualWithdrawPage"; +import { WalletBox } from "./components/styled"; +import { ProviderDetailPage } from "./wallet/ProviderDetailPage"; +import { ProviderAddPage } from "./wallet/ProviderAddPage"; function main(): void { try { @@ -66,16 +69,20 @@ if (document.readyState === "loading") { } function withLogoAndNavBar(Component: any) { - return (props: any) => ( - - - - - - ); + return function withLogoAndNavBarComponent(props: any): VNode { + return ( + + + + + + + + ); + }; } -function Application() { +function Application(): VNode { return (
@@ -105,6 +112,23 @@ function Application() { { + route(Pages.provider_add); + }} + /> + { + route(Pages.backup); + }} + /> + { + route(Pages.backup); + }} />