mirror of
				https://github.com/elyby/accounts-frontend.git
				synced 2025-05-31 14:11:58 +05:30 
			
		
		
		
	Настройка переходов для смены пасса и забыл пароль
This commit is contained in:
		| @@ -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; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user