Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/extension/src/components/App.js
Show First 20 Lines • Show All 335 Lines • ▼ Show 20 Lines | |||||
`; | `; | ||||
// Extension only styled components | // Extension only styled components | ||||
const OpenInTabBtn = styled.button` | const OpenInTabBtn = styled.button` | ||||
background: none; | background: none; | ||||
border: none; | border: none; | ||||
`; | `; | ||||
const LogoCtn = styled.div` | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-evenly; | |||||
width: 100%; | |||||
div { | |||||
flex-grow: 3; | |||||
} | |||||
${CashtabLogo} { | |||||
flex: 2; | |||||
text-align: center; | |||||
} | |||||
${OpenInTabBtn} { | |||||
flex: 3; | |||||
text-align: right; | |||||
} | |||||
`; | |||||
const ExtTabImg = styled.img` | const ExtTabImg = styled.img` | ||||
max-width: 20px; | max-width: 20px; | ||||
`; | `; | ||||
const NavHeader = styled.div` | const NavHeader = styled.div` | ||||
display: flex; | display: flex; | ||||
justify-content: center; | justify-content: center; | ||||
align-items: center; | align-items: center; | ||||
▲ Show 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | return ( | ||||
(wallet && !validWallet) | (wallet && !validWallet) | ||||
} | } | ||||
indicator={CashLoadingIcon} | indicator={CashLoadingIcon} | ||||
> | > | ||||
<CustomApp> | <CustomApp> | ||||
<WalletBody> | <WalletBody> | ||||
<WalletCtn> | <WalletCtn> | ||||
<HeaderCtn> | <HeaderCtn> | ||||
<LogoCtn> | |||||
<div></div> | |||||
<CashtabLogo src={Cashtab} alt="cashtab" /> | <CashtabLogo src={Cashtab} alt="cashtab" /> | ||||
{/*Begin extension-only components*/} | |||||
<OpenInTabBtn | |||||
data-tip="Open in tab" | |||||
onClick={() => openInTab()} | |||||
> | |||||
<ExtTabImg | |||||
src={PopOut} | |||||
alt="Open in tab" | |||||
/> | |||||
</OpenInTabBtn> | |||||
{/*End extension-only components*/} | |||||
</LogoCtn> | |||||
{selectedKey === 'airdrop' && ( | {selectedKey === 'airdrop' && ( | ||||
<NavHeader> | <NavHeader> | ||||
Airdrop | Airdrop | ||||
<AirdropIcon /> | <AirdropIcon /> | ||||
</NavHeader> | </NavHeader> | ||||
)} | )} | ||||
{selectedKey === 'configure' && ( | {selectedKey === 'configure' && ( | ||||
<NavHeader> | <NavHeader> | ||||
Settings | Settings | ||||
<SettingsIcon /> | <SettingsIcon /> | ||||
</NavHeader> | </NavHeader> | ||||
)} | )} | ||||
{selectedKey === 'signverifymsg' && ( | {selectedKey === 'signverifymsg' && ( | ||||
<NavHeader> | <NavHeader> | ||||
{' '} | {' '} | ||||
Sign & Verify Msg | Sign & Verify Msg | ||||
<ThemedSignAndVerifyMsg /> | <ThemedSignAndVerifyMsg /> | ||||
</NavHeader> | </NavHeader> | ||||
)} | )} | ||||
{/*Begin extension-only components*/} | |||||
<OpenInTabBtn | |||||
data-tip="Open in tab" | |||||
onClick={() => openInTab()} | |||||
> | |||||
<ExtTabImg src={PopOut} alt="Open in tab" /> | |||||
</OpenInTabBtn> | |||||
{/*End extension-only components*/} | |||||
</HeaderCtn> | </HeaderCtn> | ||||
{/*Note that the extension does not support biometric security*/} | {/*Note that the extension does not support biometric security*/} | ||||
{/*Hence <ProtectableComponentWrapper> is not pulled in*/} | {/*Hence <ProtectableComponentWrapper> is not pulled in*/} | ||||
<Switch> | <Switch> | ||||
<Route path="/wallet"> | <Route path="/wallet"> | ||||
<Home /> | <Home /> | ||||
</Route> | </Route> | ||||
<Route path="/receive"> | <Route path="/receive"> | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |