Skip to content

Commit

Permalink
result tx hash typo fixed and icon repositioned
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Staykov committed Jul 12, 2022
1 parent e8fb8f4 commit 1e4d92c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,42 +118,39 @@
}

.ModalContent .SummaryForm .AttentionIcon {
width: 40px;
height: 20px;
margin-right: 7px;
padding-right: 7px;
align-self: center;
}

.AttentionIcon {
position: relative;
display: inline-block;
}

/* Tooltip text */
.AttentionIcon .tooltiptext {
.ModalContent .SummaryForm .AttentionIcon {
width: 30px;
height: 30px;
flex: 0 0 auto;
}

/* Tooltip text */
.AttentionIcon .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;

/* Position the tooltip text */
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;

/* Fade in tooltip */
opacity: 0;
transition: opacity 0.3s;
}
/* Tooltip arrow */
.AttentionIcon .tooltiptext::after {
}

/* Tooltip arrow */
.AttentionIcon .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
Expand All @@ -162,13 +159,13 @@
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
/* Show the tooltip text when you mouse over the tooltip container */
.AttentionIcon:hover .tooltiptext {
}

/* Show the tooltip text when you mouse over the tooltip container */
.AttentionIcon:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
}

.ModalContent .SummaryForm .LinkIcon {
width: 18px;
Expand Down Expand Up @@ -225,5 +222,3 @@
.ModalContent .SummaryForm .Weight600 {
font-weight: 600;
}


28 changes: 14 additions & 14 deletions src/frontend/resources/common/js/components-popups/SummaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Config from '../../../../../../builds/dev-generated/Config';
import Button from '../components-inc/Button';
import ProjectUtils from '../ProjectUtils';
import CosmosNetworkH from '../models/ledgers/CosmosNetworkH';
import SvgAttention from '../../../../resources/common/img/favicon/attention.svg';

const SummaryModal = ({
closeModal,
Expand All @@ -19,7 +20,8 @@ const SummaryModal = ({
txHash,
destTxHash,
}
: { closeModal: Function,
: {
closeModal: Function,
isOpen: boolean,
getAddress: Function,
selectedFromNetwork: number,
Expand All @@ -37,16 +39,14 @@ const SummaryModal = ({
const ethLogoSmall = '../../../../resources/common/img/favicon/eth-18x18.svg';
const successIcon = '../../../../resources/common/img/favicon/successs-icon.svg';
const closeIcon = '../../../../resources/common/img/favicon/close-icon-24x24.svg';
const attentionIcon = '../../../../resources/common/img/favicon/attention-20x20.svg';
const linkIcon = '../../../../resources/common/img/favicon/link-icon.svg';

const fromNetwork = selectedFromNetwork ? ProjectUtils.CUDOS_NETWORK_TEXT : ProjectUtils.ETHEREUM_NETWORK_TEXT;
const toNetwork = selectedToNetwork ? ProjectUtils.CUDOS_NETWORK_TEXT : ProjectUtils.ETHEREUM_NETWORK_TEXT;

const ETHERSCAN_EXPLORER =
Config.CUDOS_NETWORK.NETWORK_TYPE === 'mainnet'
? Config.ETHEREUM.ETHERSCAN_MAINNET
: Config.ETHEREUM.ETHERSCAN_RINKEBY
const ETHERSCAN_EXPLORER = Config.CUDOS_NETWORK.NETWORK_TYPE === 'mainnet'
? Config.ETHEREUM.ETHERSCAN_MAINNET
: Config.ETHEREUM.ETHERSCAN_RINKEBY
const CUDOS_EXPLORER = Config.CUDOS_NETWORK.BLOCK_EXPLORER;

const onCloseModal = async () => {
Expand Down Expand Up @@ -110,23 +110,23 @@ const SummaryModal = ({
<div>Transaction</div>
</div>
<div className={'Row Spacing LinkWrapper'}>
<div className={'LinkContent'}><a href= {`${selectedFromNetwork ? CUDOS_EXPLORER : ETHERSCAN_EXPLORER}/${txHash}`} rel='noreferrer' target='_blank'>
<div className={'LinkContent'}><a href={`${selectedFromNetwork ? CUDOS_EXPLORER : ETHERSCAN_EXPLORER}/${txHash}`} rel='noreferrer' target='_blank'>
{selectedFromNetwork ? 'Cudos' : 'Ethereum'} Bridge transaction link</a>
<div className={'LinkIcon'} style={ProjectUtils.makeBgImgStyle(linkIcon)} />
<div className={'LinkIcon'} style={ProjectUtils.makeBgImgStyle(linkIcon)} />
</div>
</div>
{ selectedFromNetwork ? ''
{selectedFromNetwork ? ''
: <div className={'Row Spacing LinkWrapper'}>
<div className={'LinkContent'}><a href= {`${CUDOS_EXPLORER}/${txHash}`} rel='noreferrer' target='_blank'>
<div className={'LinkContent'}><a href={`${CUDOS_EXPLORER}/${destTxHash}`} rel='noreferrer' target='_blank'>
Cudos Bridge transaction link</a>
<div className={'LinkIcon'} style={ProjectUtils.makeBgImgStyle(linkIcon)} />
<div className={'LinkIcon'} style={ProjectUtils.makeBgImgStyle(linkIcon)} />
</div>
</div>
}
<div className={'Row DoubleSpacing'}>
<div className={'TransactionMesasge'}>
<div className={'AttentionIcon'} style={ProjectUtils.makeBgImgStyle(attentionIcon)}/>
<div>{ selectedFromNetwork ? CUDOS_SUCCESS_MESSAGE : ETHEREUM_SUCCESS_MESSAGE}</div>
<div className={'TransactionMesasge FlexRow'}>
<div className={'AttentionIcon SVG Size'} dangerouslySetInnerHTML={{ __html: SvgAttention }} />
<div>{selectedFromNetwork ? CUDOS_SUCCESS_MESSAGE : ETHEREUM_SUCCESS_MESSAGE}</div>
</div>
</div>
<div className={'Flex DoubleSpacing BtnWrapper'}>
Expand Down

0 comments on commit 1e4d92c

Please sign in to comment.