1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 17:53:39 +00:00

forward/back animations for nested cipher folders/cols

This commit is contained in:
Kyle Spearrin
2018-10-29 08:58:20 -04:00
parent 69e664a154
commit 0cdc343ce0
5 changed files with 20 additions and 25 deletions

View File

@@ -103,17 +103,17 @@ export const routerTransition = trigger('routerTransition', [
transition('2fa => tabs', inSlideLeft),
transition((fromState, toState) => {
if (fromState == null || toState === null || toState.indexOf('ciphers_') !== 0) {
if (fromState == null || toState === null || toState.indexOf('ciphers_') === -1) {
return false;
}
return fromState.indexOf('ciphers_direction=f') === 0 || fromState === 'tabs';
return (fromState.indexOf('ciphers_') === 0 && fromState.indexOf('ciphers_direction=b') === -1) ||
fromState === 'tabs';
}, inSlideLeft),
transition((fromState, toState) => {
if (fromState == null || toState === null || fromState.indexOf('ciphers_') !== 0) {
if (fromState == null || toState === null || fromState.indexOf('ciphers_') === -1) {
return false;
}
return (fromState.indexOf('ciphers_') === 0 && fromState.indexOf('ciphers_direction=f') === -1) ||
toState === 'tabs';
return toState.indexOf('ciphers_direction=b') === 0 || toState === 'tabs';
}, outSlideRight),
transition((fromState, toState) => {