Skip to content

Commit

Permalink
fix(lockbox): add ability to dismiss software download banner
Browse files Browse the repository at this point in the history
  • Loading branch information
schnogz committed Sep 9, 2019
1 parent 9da7e91 commit 7c8e664
Showing 1 changed file with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const LeftColumn = styled.div`
`
const RightColumn = styled.div`
display: flex;
flex-direction: row;
justify-content: flex-end;
flex-direction: column;
justify-content: center;
align-items: center;
margin-right: 25px;
`
Expand All @@ -67,6 +67,12 @@ const DownloadIcon = styled(Icon)`
margin-left: 12px;
margin-top: 10px;
`
const DismissDownloadText = styled(Text)`
margin-top: 8px;
&:hover {
cursor: pointer;
}
`
class UpdateRequiredNotice extends React.PureComponent {
getOsSpecificUpdater = () => {
const os = Bowser.getParser(window.navigator.userAgent).getOSName(true)
Expand Down Expand Up @@ -99,7 +105,7 @@ class UpdateRequiredNotice extends React.PureComponent {
}

render () {
const { showLockboxDownload } = this.props
const { preferencesActions, showLockboxDownload } = this.props

return (
showLockboxDownload && (
Expand Down Expand Up @@ -156,6 +162,17 @@ class UpdateRequiredNotice extends React.PureComponent {
/>
</Button>
</Link>
<DismissDownloadText
size='11px'
color='blue'
weight={500}
onClick={() => preferencesActions.hideLockboxSoftwareDownload()}
>
<FormattedMessage
id='scenes.lockbox.dashboard.updaterequirednotice.dismiss'
defaultMessage="I've already updated"
/>
</DismissDownloadText>
</RightColumn>
</Wrapper>
)
Expand Down

0 comments on commit 7c8e664

Please sign in to comment.