mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 10:12:00 +08:00
fix(onboarding): Don't allow going back into N1 signin
This commit is contained in:
parent
45dfcc1a6c
commit
7d52bb0d3c
2 changed files with 15 additions and 4 deletions
|
@ -66,7 +66,10 @@ export default class OnboardingRoot extends React.Component {
|
|||
|
||||
return (
|
||||
<div className="page-frame">
|
||||
<PageTopBar pageDepth={this.state.pageDepth} />
|
||||
<PageTopBar
|
||||
pageDepth={this.state.pageDepth}
|
||||
allowMoveBack={this.state.page !== 'account-choose'}
|
||||
/>
|
||||
<ReactCSSTransitionGroup
|
||||
transitionName="alpha-fade"
|
||||
transitionLeaveTimeout={150}
|
||||
|
|
|
@ -23,6 +23,15 @@ const PageTopBar = (props) => {
|
|||
}
|
||||
}
|
||||
|
||||
let backButton = (
|
||||
<div className={closeClass} onClick={closeAction}>
|
||||
<RetinaImg name={closeIcon} mode={RetinaImg.Mode.ContentPreserve} />
|
||||
</div>
|
||||
)
|
||||
if (props.pageDepth > 1 && !props.allowMoveBack) {
|
||||
backButton = null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="dragRegion"
|
||||
|
@ -36,15 +45,14 @@ const PageTopBar = (props) => {
|
|||
WebkitAppRegion: "drag",
|
||||
}}
|
||||
>
|
||||
<div className={closeClass} onClick={closeAction}>
|
||||
<RetinaImg name={closeIcon} mode={RetinaImg.Mode.ContentPreserve} />
|
||||
</div>
|
||||
{backButton}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
PageTopBar.propTypes = {
|
||||
pageDepth: React.PropTypes.number,
|
||||
allowMoveBack: React.PropTypes.bool,
|
||||
};
|
||||
|
||||
export default PageTopBar;
|
||||
|
|
Loading…
Reference in a new issue