-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add announcement for users migrated to the new UI
- Loading branch information
Showing
15 changed files
with
122 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
ui/app/components/modals/welcome-beta/welcome-beta.component.js
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
ui/app/components/modals/welcome-beta/welcome-beta.container.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export {default} from './ui-migration-announcement.container' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.ui-migration-announcement { | ||
position: absolute; | ||
z-index: 9999; | ||
width: 100vw; | ||
height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
background: $white; | ||
|
||
p { | ||
box-sizing: border-box; | ||
padding: 1em; | ||
font-size: 12pt; | ||
} | ||
|
||
p:last-of-type { | ||
cursor: pointer; | ||
text-decoration: underline; | ||
font-weight: bold; | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
ui/app/components/ui-migration-annoucement/ui-migration-annoucement.component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import PropTypes from 'prop-types' | ||
import React, {PureComponent} from 'react' | ||
|
||
export default class UiMigrationAnnouncement extends PureComponent { | ||
static contextTypes = { | ||
t: PropTypes.func.isRequired, | ||
} | ||
|
||
static defaultProps = { | ||
shouldShowAnnouncement: true, | ||
}; | ||
|
||
static propTypes = { | ||
onClose: PropTypes.func.isRequired, | ||
shouldShowAnnouncement: PropTypes.bool, | ||
} | ||
|
||
render () { | ||
const { t } = this.context | ||
const { onClose, shouldShowAnnouncement } = this.props | ||
|
||
if (!shouldShowAnnouncement) { | ||
return null | ||
} | ||
|
||
return ( | ||
<div className="ui-migration-announcement"> | ||
<p>{t('uiMigrationAnnouncement')}</p> | ||
<p onClick={onClose}>{t('close')}</p> | ||
</div> | ||
) | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
ui/app/components/ui-migration-annoucement/ui-migration-announcement.container.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { connect } from 'react-redux' | ||
import UiMigrationAnnouncement from './ui-migration-annoucement.component' | ||
import { setCompletedUiMigration } from '../../actions' | ||
|
||
const mapStateToProps = (state) => { | ||
const shouldShowAnnouncement = !state.metamask.completedUiMigration | ||
|
||
return { | ||
shouldShowAnnouncement, | ||
} | ||
} | ||
|
||
const mapDispatchToProps = dispatch => { | ||
return { | ||
onClose () { | ||
dispatch(setCompletedUiMigration()) | ||
}, | ||
} | ||
} | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(UiMigrationAnnouncement) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters