diff options
author | Sebastian <sebasjm@gmail.com> | 2021-08-13 18:04:05 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-08-13 18:04:30 -0300 |
commit | e9bb85a212dbd9b86875e89a0aca5d805e2ad61b (patch) | |
tree | 7fb2f9f28fc382d7348cd45cb730b302217099c7 /packages/taler-wallet-webextension/src/walletEntryPoint.tsx | |
parent | eb553be84163946e4ffa5b2a4dfaa2029aebc534 (diff) | |
download | wallet-core-e9bb85a212dbd9b86875e89a0aca5d805e2ad61b.tar.xz |
new wallet UI and more tests
Diffstat (limited to 'packages/taler-wallet-webextension/src/walletEntryPoint.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/walletEntryPoint.tsx | 68 |
1 files changed, 9 insertions, 59 deletions
diff --git a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx index 004fcc717..f487e54fc 100644 --- a/packages/taler-wallet-webextension/src/walletEntryPoint.tsx +++ b/packages/taler-wallet-webextension/src/walletEntryPoint.tsx @@ -32,7 +32,6 @@ import { RefundPage } from "./wallet/Refund"; import { TipPage } from './wallet/Tip'; import Router, { route, Route } from "preact-router"; - function main(): void { try { const container = document.getElementById("container"); @@ -67,64 +66,15 @@ enum Pages { } function Application() { - const sp = new URL(document.location.href).searchParams - const queryParams: any = {} - sp.forEach((v, k) => { queryParams[k] = v; }); - - return <Router history={createHashHistory()} > - - <Route path={Pages.welcome} component={() => { - return <section class="main"> - <div style="border-bottom: 3px dashed #aa3939; margin-bottom: 2em;"> - <h1 style="font-family: monospace; font-size: 250%;"> - <span style="color: #aa3939;">❰</span>Taler Wallet<span style="color: #aa3939;">❱</span> - </h1> - </div> - <h1>Browser Extension Installed!</h1> - <div> - <WelcomePage /> - </div> - </section> - }} /> - - <Route path={Pages.pay} component={() => { - return <section class="main"> - <h1>GNU Taler Wallet</h1> - <article class="fade"> - <PayPage talerPayUri={queryParams.talerPayUri} /> - </article> - </section> - }} /> - - <Route path={Pages.refund} component={() => { - return <section class="main"> - <h1>GNU Taler Wallet</h1> - <article class="fade"> - <RefundPage talerRefundUri={queryParams.talerRefundUri} /> - </article> - </section> - }} /> - - <Route path={Pages.tips} component={() => { - return <section class="main"> - <h1>GNU Taler Wallet</h1> - <div> - <TipPage talerTipUri={queryParams.talerTipUri} /> - </div> - </section> - }} /> - <Route path={Pages.withdraw} component={() => { - return <section class="main"> - <div style="border-bottom: 3px dashed #aa3939; margin-bottom: 2em;"> - <h1 style="font-family: monospace; font-size: 250%;"> - <span style="color: #aa3939;">❰</span>Taler Wallet<span style="color: #aa3939;">❱</span> - </h1> - </div> - <div class="fade"> - <WithdrawPage talerWithdrawUri={queryParams.talerWithdrawUri} /> - </div> - </section> - }} /> + const h = createHashHistory(); + return <Router history={h} > + + <Route path={Pages.welcome} component={WelcomePage} /> + <Route path={Pages.pay} component={PayPage} /> + <Route path={Pages.refund} component={RefundPage} /> + + <Route path={Pages.tips} component={TipPage} /> + <Route path={Pages.withdraw} component={WithdrawPage} /> <Route path={Pages.reset_required} component={() => <div>no yet implemented</div>} /> <Route path={Pages.payback} component={() => <div>no yet implemented</div>} /> |