show pending operations on main pages

This commit is contained in:
Sebastian 2022-03-25 17:06:38 -03:00
parent ddfb40e50c
commit e89821a6c7
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
3 changed files with 21 additions and 15 deletions

View File

@ -34,7 +34,7 @@
<iframe
id="wallet-window"
name="wallet"
src="about:blank"
src="/wallet.html"
name="wallet"
width="800"
height="100%"

View File

@ -62,7 +62,7 @@ const api: PlatformAPI = ({
},
registerAllIncomingConnections: () => undefined,
registerOnInstalled: (fn: () => void) => fn(),
registerOnInstalled: (fn: () => void) => undefined,
registerReloadOnNewVersion: () => undefined,
registerTalerHeaderListener: () => undefined,

View File

@ -83,19 +83,21 @@ export function Application(): VNode {
<Fragment>
<LogoHeader />
<WalletNavBar path={path} />
<div
style={{
backgroundColor: "lightcyan",
display: "flex",
justifyContent: "center",
}}
>
<PendingTransactions
goToTransaction={(txId: string) =>
route(Pages.balance_transaction.replace(":tid", txId))
}
/>
</div>
{shouldShowPendingOperations(path) && (
<div
style={{
backgroundColor: "lightcyan",
display: "flex",
justifyContent: "center",
}}
>
<PendingTransactions
goToTransaction={(txId: string) =>
route(Pages.balance_transaction.replace(":tid", txId))
}
/>
</div>
)}
</Fragment>
);
}}
@ -261,3 +263,7 @@ function Redirect({ to }: { to: string }): null {
});
return null;
}
function shouldShowPendingOperations(path: string): boolean {
return ["/balance/history/", "/dev", "/settings", "/backup"].includes(path);
}