Skip to content

Commit cf383c4

Browse files
Update Tooltips
1 parent a699ec6 commit cf383c4

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apps/frontend/src/components/cln/ChannelDetails/ChannelDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PerfectScrollbar from 'react-perfect-scrollbar';
44
import { Spinner, Card, Row, Col, ProgressBar, OverlayTrigger, Tooltip } from 'react-bootstrap';
55

66
import { copyTextToClipboard, formatCurrency, titleCase } from '../../../utilities/data-formatters';
7-
import { CallStatus, CLEAR_STATUS_ALERT_DELAY, Units } from '../../../utilities/constants';
7+
import { CallStatus, channelStateMap, CLEAR_STATUS_ALERT_DELAY, Units } from '../../../utilities/constants';
88
import { ActionSVG } from '../../../svgs/Action';
99
import { CloseSVG } from '../../../svgs/Close';
1010
import StatusAlert from '../../shared/StatusAlert/StatusAlert';
@@ -119,7 +119,7 @@ const ChannelDetails = (props) => {
119119
<OverlayTrigger
120120
placement='auto'
121121
delay={{ show: 250, hide: 250 }}
122-
overlay={<Tooltip>{titleCase(props.selChannel.current_state)}</Tooltip>}
122+
overlay={<Tooltip>{titleCase(props.selChannel.current_state) + ' - ' + (channelStateMap[props.selChannel.state] ?? titleCase(props.selChannel.state?.replaceAll('_', ' ')))}</Tooltip>}
123123
>
124124
<span className='d-flex align-items-center justify-content-start fw-bold'>
125125
<div className={'d-inline-block mx-1 dot ' + (props.selChannel.current_state?.toLowerCase() === 'active' ? 'bg-success' : props.selChannel.current_state?.toLowerCase() === 'pending' ? 'bg-warning' : 'bg-danger')}></div>

apps/frontend/src/components/cln/Channels/Channels.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Spinner, Card, Row, Col, ListGroup, Alert, ProgressBar, OverlayTrigger,
55

66
import { titleCase } from '../../../utilities/data-formatters';
77
import { ActionSVG } from '../../../svgs/Action';
8-
import { STAGERRED_SPRING_VARIANTS_3 } from '../../../utilities/constants';
8+
import { channelStateMap, STAGERRED_SPRING_VARIANTS_3 } from '../../../utilities/constants';
99
import { NoChannelLightSVG } from '../../../svgs/NoChannelLight';
1010
import { NoChannelDarkSVG } from '../../../svgs/NoChannelDark';
1111
import { useSelector } from 'react-redux';
@@ -45,7 +45,7 @@ const Channels = (props) => {
4545
<OverlayTrigger
4646
placement='auto'
4747
delay={{ show: 250, hide: 250 }}
48-
overlay={<Tooltip>{titleCase(channel.current_state)}</Tooltip>}
48+
overlay={<Tooltip>{titleCase(channel.current_state) + ' - ' + (channelStateMap[channel.state] ?? titleCase(channel.state?.replaceAll('_', ' ')))}</Tooltip>}
4949
>
5050
<span data-testid='channel-node-alias'>
5151
<div className={'d-inline-block mx-1 dot ' + (channel.current_state?.toLowerCase() === 'active' ? 'bg-success' : channel.current_state?.toLowerCase() === 'pending' ? 'bg-warning' : 'bg-danger')}></div>

0 commit comments

Comments
 (0)