Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
feat: display paylock icon for private channels
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Mar 26, 2020
1 parent 0512292 commit ef16141
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion renderer/components/Channels/ChannelCardListItem.js
Expand Up @@ -12,6 +12,7 @@ import ChannelData from './ChannelData'
import ChannelCapacity from './ChannelCapacity'
import ChannelMoreButton from './ChannelMoreButton'
import ChannelStatus from './ChannelStatus'
import Padlock from 'components/Icon/Padlock'
import messages from './messages'

const ClippedHeading = withEllipsis(Heading.h1)
Expand All @@ -31,6 +32,7 @@ const ChannelCardListItem = React.memo(
remote_balance,
display_status,
active,
private: isPrivate,
} = channel
const opacity = active ? 1 : 0.3

Expand All @@ -43,7 +45,14 @@ const ChannelCardListItem = React.memo(
{display_name}
</ClippedHeading>

<ChannelStatus mb="auto" status={display_status} />
<Flex>
{isPrivate && (
<Box color="gray" fontSize="s" mr={1}>
<Padlock />
</Box>
)}
<ChannelStatus mb="auto" status={display_status} />
</Flex>
</Flex>
<Flex justifyContent="space-between" opacity={opacity}>
<Text fontWeight="normal">
Expand Down
11 changes: 10 additions & 1 deletion renderer/components/Channels/ChannelSummaryListItem.js
Expand Up @@ -7,6 +7,7 @@ import { withEllipsis } from 'hocs'
import ChannelCapacity from './ChannelCapacity'
import ChannelMoreButton from './ChannelMoreButton'
import ChannelStatus from './ChannelStatus'
import Padlock from 'components/Icon/Padlock'

const ClippedHeading = withEllipsis(Heading.h1)
const ClippedText = withEllipsis(Text)
Expand All @@ -24,14 +25,22 @@ const ChannelSummaryListItem = React.memo(props => {
remote_balance,
display_status,
active,
private: isPrivate,
} = channel
const opacity = active ? 1 : 0.3

return (
<Card {...rest}>
<Flex alignItems="center">
<Box width={8 / 20}>
<ChannelStatus status={display_status} />
<Flex>
<ChannelStatus status={display_status} />
{isPrivate && (
<Box color="gray" fontSize="s" ml={1}>
<Padlock />
</Box>
)}
</Flex>
<ClippedHeading my={1} opacity={opacity}>
{display_name}
</ClippedHeading>
Expand Down

0 comments on commit ef16141

Please sign in to comment.