diff --git a/src/components/Group/Group.tsx b/src/components/Group/Group.tsx index 030ac51..3528ab2 100644 --- a/src/components/Group/Group.tsx +++ b/src/components/Group/Group.tsx @@ -1763,7 +1763,7 @@ export const Group = ({ sx={{ background: direct?.address === selectedDirect?.address && - theme.palette.background.default, + theme.palette.background.paper, borderRadius: '2px', cursor: 'pointer', display: 'flex', @@ -1782,7 +1782,7 @@ export const Group = ({ + {direct?.sender !== myAddress && direct?.timestamp && ((!timestampEnterData[direct?.address] && @@ -1939,7 +1940,7 @@ export const Group = ({ setInfo={setInfoSnack} /> -
-
+ ); }; diff --git a/src/components/Minting/Minting.tsx b/src/components/Minting/Minting.tsx index 43cc4b9..a54a614 100644 --- a/src/components/Minting/Minting.tsx +++ b/src/components/Minting/Minting.tsx @@ -13,12 +13,20 @@ import { IconButton, Paper, Snackbar, + Tab, + Tabs, Toolbar, Typography, useTheme, } from '@mui/material'; import Grid from '@mui/material/Grid'; -import { useCallback, useEffect, useMemo, useState } from 'react'; +import { + SyntheticEvent, + useCallback, + useEffect, + useMemo, + useState, +} from 'react'; import CloseIcon from '@mui/icons-material/Close'; import { getBaseApiReact } from '../../App'; import { @@ -46,6 +54,7 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { const [openSnack, setOpenSnack] = useState(false); const [isLoading, setIsLoading] = useState(false); const [adminInfo, setAdminInfo] = useState({}); + const [valueMintingTab, setValueMintingTab] = useState(0); const { isShow: isShowNext, onOk, show: showNext } = useModal(); const theme = useTheme(); const { t } = useTranslation([ @@ -110,6 +119,13 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { } }; + function a11yProps(index: number) { + return { + id: `simple-tab-${index}`, + 'aria-controls': `simple-tabpanel-${index}`, + }; + } + const getAccountInfo = async (address: string, others?: boolean) => { try { if (!others) { @@ -514,6 +530,10 @@ export const Minting = ({ setIsOpenMinting, myAddress, show }) => { ); + const handleChange = (event: SyntheticEvent, newValue: number) => { + setValueMintingTab(newValue); + }; + return ( { - - {isLoading && ( - + + + + + + + + {valueMintingTab === 0 && ( + <> + - - - )} + + + + Blockchain Statistics + - - - {t('auth:account.account_one', { - postProcess: 'capitalizeFirstChar', - })} - : {handleNames(accountInfo?.address)} - + + + + + + - - {t('core:level', { - postProcess: 'capitalizeFirstChar', - })} - : {accountInfo?.level} - + + + Minting Account Details + - - {t('group:message.generic.next_level', { - postProcess: 'capitalizeFirstChar', - })}{' '} - {_levelUpBlocks()} - + + + + + - - {t('group:message.generic.node_minting', { - postProcess: 'capitalizeFirstChar', - })}{' '} - {nodeInfos?.isMintingPossible?.toString()} - - + + + With a 24/7 Minting you will reach level 5 in{' '} + 117.58 days! + + + - + + + Minting Rewards Info + - {isPartOfMintingGroup && !accountIsMinting && ( - + + + + + + {/* */} + + + + + + )} + + {valueMintingTab === 1 && ( + <> + - - - {mintingAccounts?.length > 1 && ( - {t('group:message.generic.minting_keys_per_node', { + {t('auth:account.account_one', { + postProcess: 'capitalizeFirstChar', + })} + : {handleNames(accountInfo?.address)} + + + + {t('core:level', { + postProcess: 'capitalizeFirstChar', + })} + : {accountInfo?.level} + + + + {t('group:message.generic.next_level', { + postProcess: 'capitalizeFirstChar', + })}{' '} + {_levelUpBlocks()} + + + + {t('group:message.generic.node_minting', { + postProcess: 'capitalizeFirstChar', + })}{' '} + {nodeInfos?.isMintingPossible?.toString()} + + + + + + {isPartOfMintingGroup && !accountIsMinting && ( + + + + {mintingAccounts?.length > 1 && ( + + {t('group:message.generic.minting_keys_per_node', { + postProcess: 'capitalizeFirstChar', + })} + + )} + + )} + + + + {mintingAccounts?.length > 0 && ( + + {t('group:message.generic.node_minting_account', { postProcess: 'capitalizeFirstChar', })} )} - - )} - - - - {mintingAccounts?.length > 0 && ( - - {t('group:message.generic.node_minting_account', { - postProcess: 'capitalizeFirstChar', - })} - - )} - - {accountIsMinting && ( - - - {t('group:message.generic.node_minting_key', { - postProcess: 'capitalizeFirstChar', - })} - - - )} + {accountIsMinting && ( + + + {t('group:message.generic.node_minting_key', { + postProcess: 'capitalizeFirstChar', + })} + + + )} - + - {mintingAccounts?.map((acct) => ( - - - {t('group:message.generic.minting_account', { - postProcess: 'capitalizeFirstChar', - })}{' '} - {handleNames(acct?.mintingAccount)} - + {mintingAccounts?.map((acct) => ( + + + {t('group:message.generic.minting_account', { + postProcess: 'capitalizeFirstChar', + })}{' '} + {handleNames(acct?.mintingAccount)} + - + + + + + + ))} + + {mintingAccounts?.length > 1 && ( + + {t('group:message.generic.minting_keys_per_node_different', { + postProcess: 'capitalizeFirstChar', + })} + + )} + + + + + {!isPartOfMintingGroup && ( + + + + {t('group:message.generic.minter_group', { + postProcess: 'capitalizeFirstChar', + })} + + + + {t('group:message.generic.mintership_app', { + postProcess: 'capitalizeFirstChar', + })} + + + + + + + + )} + + {showWaitDialog && ( + + { - removeMintingAccount(acct.publicKey, acct); - }} - variant="contained" - > - {t('group:action.remove_minting_account', { - postProcess: 'capitalizeFirstChar', - })} - + }} + > + {isShowNext + ? t('core:message.generic.confirmed', { + postProcess: 'capitalizeFirstChar', + }) + : t('core:message.generic.wait', { + postProcess: 'capitalizeFirstChar', + })} + - + + {!isShowNext && ( + + {t('group:message.success.rewardshare_creation', { + postProcess: 'capitalizeFirstChar', + })} + + )} - - - ))} + {isShowNext && ( + + {t('group:message.success.rewardshare_confirmed', { + postProcess: 'capitalizeFirstChar', + })} + + )} + - {mintingAccounts?.length > 1 && ( - - {t('group:message.generic.minting_keys_per_node_different', { - postProcess: 'capitalizeFirstChar', - })} - - )} - - - - - {!isPartOfMintingGroup && ( - - - - {t('group:message.generic.minter_group', { - postProcess: 'capitalizeFirstChar', - })} - - - - {t('group:message.generic.mintership_app', { - postProcess: 'capitalizeFirstChar', - })} - - - - - - - - )} - - - - General Minting Details - - - - - Blockchain Statistics - - - - - - - - - - - - Minting Account Details - - - - - - - - - - - With a 24/7 Minting you will reach level 5 in{' '} - 117.58 days! - - - - - - - Minting Rewards Info - - - - - - - - - {/* */} - - - - - {showWaitDialog && ( - - - {isShowNext - ? t('core:message.generic.confirmed', { - postProcess: 'capitalizeFirstChar', - }) - : t('core:message.generic.wait', { - postProcess: 'capitalizeFirstChar', - })} - - - - {!isShowNext && ( - - {t('group:message.success.rewardshare_creation', { - postProcess: 'capitalizeFirstChar', - })} - - )} - - {isShowNext && ( - - {t('group:message.success.rewardshare_confirmed', { - postProcess: 'capitalizeFirstChar', - })} - - )} - - - - - - - )} - + + + + + )} + + + )} { if (isLoading) return null; return ( -
+ {wallets?.length === 0 || !wallets ? ( <> @@ -469,7 +469,7 @@ export const Wallets = ({ setExtState, setRawWallet, rawWallet }) => { -
+ ); };