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 <iframe
id="wallet-window" id="wallet-window"
name="wallet" name="wallet"
src="about:blank" src="/wallet.html"
name="wallet" name="wallet"
width="800" width="800"
height="100%" height="100%"

View File

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

View File

@ -83,6 +83,7 @@ export function Application(): VNode {
<Fragment> <Fragment>
<LogoHeader /> <LogoHeader />
<WalletNavBar path={path} /> <WalletNavBar path={path} />
{shouldShowPendingOperations(path) && (
<div <div
style={{ style={{
backgroundColor: "lightcyan", backgroundColor: "lightcyan",
@ -96,6 +97,7 @@ export function Application(): VNode {
} }
/> />
</div> </div>
)}
</Fragment> </Fragment>
); );
}} }}
@ -261,3 +263,7 @@ function Redirect({ to }: { to: string }): null {
}); });
return null; return null;
} }
function shouldShowPendingOperations(path: string): boolean {
return ["/balance/history/", "/dev", "/settings", "/backup"].includes(path);
}