1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +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

@@ -132,6 +132,13 @@ export class AppComponent implements OnInit {
this.stateService.remove('addEditCipher');
}
this.previousUrl = url;
// Clear route direction after animation (400ms)
if ((window as any).routeDirection != null) {
window.setTimeout(() => {
(window as any).routeDirection = null;
}, 400);
}
}
});
}
@@ -140,7 +147,8 @@ export class AppComponent implements OnInit {
if (BrowserApi.isEdge18) {
return null;
} else if (outlet.activatedRouteData.state === 'ciphers') {
return 'ciphers_direction=' + (outlet.activatedRoute.queryParams as any).value.direction + '_' +
const routeDirection = (window as any).routeDirection != null ? (window as any).routeDirection : '';
return 'ciphers_direction=' + routeDirection + '_' +
(outlet.activatedRoute.queryParams as any).value.folderId + '_' +
(outlet.activatedRoute.queryParams as any).value.collectionId;
} else {