mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-01 01:35:11 +00:00
add third tab
This commit is contained in:
parent
f60e6b4802
commit
df93f795b6
1 changed files with 54 additions and 18 deletions
|
@ -80,14 +80,44 @@ const WalletPage = (props: Props) => {
|
||||||
})();
|
})();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
React.useEffect(() => {
|
function focusLBCTab(){
|
||||||
// if (tab === 'currency') {
|
document.getElementsByClassName('lbc-transactions')[0].style.display = 'inline';
|
||||||
if (1 === 1) {
|
document.getElementsByClassName('fiat-transactions')[0].style.display = 'none';
|
||||||
document.getElementsByClassName('lbc-transactions')[0].style.display = 'none';
|
document.getElementsByClassName('payment-history-tab')[0].style.display = 'none';
|
||||||
document.getElementsByClassName('fiat-transactions')[0].style.display = 'inline';
|
|
||||||
|
|
||||||
document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'none';
|
document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'underline';
|
||||||
document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'underline';
|
document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'none';
|
||||||
|
document.getElementsByClassName('fiat-payment-history-switcher')[0].style.textDecoration = 'none';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function focusAccountHistoryTab(){
|
||||||
|
document.getElementsByClassName('lbc-transactions')[0].style.display = 'none';
|
||||||
|
document.getElementsByClassName('payment-history-tab')[0].style.display = 'none';
|
||||||
|
document.getElementsByClassName('fiat-transactions')[0].style.display = 'inline';
|
||||||
|
|
||||||
|
document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'none';
|
||||||
|
document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'underline';
|
||||||
|
document.getElementsByClassName('fiat-payment-history-switcher')[0].style.textDecoration = 'none';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function focusPaymentHistoryTab(){
|
||||||
|
document.getElementsByClassName('lbc-transactions')[0].style.display = 'none';
|
||||||
|
document.getElementsByClassName('fiat-transactions')[0].style.display = 'none';
|
||||||
|
document.getElementsByClassName('payment-history-tab')[0].style.display = 'inline';
|
||||||
|
|
||||||
|
document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'none';
|
||||||
|
document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'none';
|
||||||
|
document.getElementsByClassName('fiat-payment-history-switcher')[0].style.textDecoration = 'underline';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// select the first tab
|
||||||
|
React.useEffect(() => {
|
||||||
|
// if (tab === 'account-history') {
|
||||||
|
if (1 === 1) {
|
||||||
|
focusAccountHistoryTab()
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
@ -102,23 +132,22 @@ const WalletPage = (props: Props) => {
|
||||||
<h2 className="lbc-tab-switcher"
|
<h2 className="lbc-tab-switcher"
|
||||||
style={{display: 'inline-block', paddingBottom: '16px', marginRight: '14px', textUnderlineOffset: '4px', textDecoration: 'underline', fontSize: '18px', marginLeft: '3px'}}
|
style={{display: 'inline-block', paddingBottom: '16px', marginRight: '14px', textUnderlineOffset: '4px', textDecoration: 'underline', fontSize: '18px', marginLeft: '3px'}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
document.getElementsByClassName('lbc-transactions')[0].style.display = 'inline';
|
focusLBCTab();
|
||||||
document.getElementsByClassName('fiat-transactions')[0].style.display = 'none';
|
|
||||||
|
|
||||||
document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'underline';
|
|
||||||
document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'none';
|
|
||||||
}}
|
}}
|
||||||
>LBC Wallet</h2>
|
>LBC Wallet</h2>
|
||||||
<h2 className="fiat-tab-switcher"
|
<h2 className="fiat-tab-switcher"
|
||||||
style={{display: 'inline-block', textUnderlineOffset: '4px', fontSize: '18px'}}
|
style={{display: 'inline-block', textUnderlineOffset: '4px', fontSize: '18px', marginRight: '14px'}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
document.getElementsByClassName('lbc-transactions')[0].style.display = 'none';
|
focusAccountHistoryTab();
|
||||||
document.getElementsByClassName('fiat-transactions')[0].style.display = 'inline';
|
|
||||||
|
|
||||||
document.getElementsByClassName('lbc-tab-switcher')[0].style.textDecoration = 'none';
|
|
||||||
document.getElementsByClassName('fiat-tab-switcher')[0].style.textDecoration = 'underline';
|
|
||||||
}}
|
}}
|
||||||
>Account History</h2>
|
>Account History</h2>
|
||||||
|
|
||||||
|
<h2 className="fiat-payment-history-switcher"
|
||||||
|
style={{display: 'inline-block', textUnderlineOffset: '4px', fontSize: '18px'}}
|
||||||
|
onClick={() => {
|
||||||
|
focusPaymentHistoryTab();
|
||||||
|
}}
|
||||||
|
>Payment History</h2>
|
||||||
<div className="lbc-transactions">
|
<div className="lbc-transactions">
|
||||||
{/* if the transactions are loading */}
|
{/* if the transactions are loading */}
|
||||||
{ loading && (
|
{ loading && (
|
||||||
|
@ -149,6 +178,13 @@ const WalletPage = (props: Props) => {
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<>
|
||||||
|
<div className="payment-history-tab" style={{display: 'none'}}>
|
||||||
|
<h2>Card Transaction History</h2>
|
||||||
|
</div>
|
||||||
|
</>
|
||||||
|
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue