mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-01-14 15:52:44 +05:30
Настройка переходов для смены пасса и забыл пароль
This commit is contained in:
parent
5e7d063449
commit
b26c515997
@ -160,7 +160,9 @@ class PanelTransition extends Component {
|
||||
'/register': -1,
|
||||
'/password': 1,
|
||||
'/activation': 1,
|
||||
'/oauth/permissions': -1
|
||||
'/oauth/permissions': -1,
|
||||
'/password-change': 1,
|
||||
'/forgot-password': 1
|
||||
};
|
||||
var sign = map[key];
|
||||
|
||||
@ -172,6 +174,22 @@ class PanelTransition extends Component {
|
||||
};
|
||||
}
|
||||
|
||||
getDirection(next, prev) {
|
||||
var not = (path) => prev !== path && next !== path;
|
||||
|
||||
var map = {
|
||||
'/login': not('/password') && not('/forgot-password') ? 'Y' : 'X',
|
||||
'/password': not('/login') && not('/forgot-password') ? 'Y' : 'X',
|
||||
'/register': not('/activation') ? 'Y' : 'X',
|
||||
'/activation': not('/register') ? 'Y' : 'X',
|
||||
'/oauth/permissions': 'Y',
|
||||
'/password-change': 'Y',
|
||||
'/forgot-password': not('/password') && not('/login') ? 'Y' : 'X'
|
||||
};
|
||||
|
||||
return map[next];
|
||||
}
|
||||
|
||||
onUpdateHeight = (height) => {
|
||||
const canAnimateHeight = Object.keys(this.state.height).length > 1 || this.state.height[[this.props.path]];
|
||||
|
||||
@ -197,20 +215,6 @@ class PanelTransition extends Component {
|
||||
this.props.goBack();
|
||||
};
|
||||
|
||||
getDirection(next, prev) {
|
||||
var not = (path) => prev !== path && next !== path;
|
||||
|
||||
var map = {
|
||||
'/login': not('/password') ? 'Y' : 'X',
|
||||
'/password': not('/login') ? 'Y' : 'X',
|
||||
'/register': not('/activation') ? 'Y' : 'X',
|
||||
'/activation': not('/register') ? 'Y' : 'X',
|
||||
'/oauth/permissions': 'Y'
|
||||
};
|
||||
|
||||
return map[next];
|
||||
}
|
||||
|
||||
getHeader(key, props) {
|
||||
var {hasBackButton, transformSpring, Title} = props;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user