1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

tracking vault state with stateService

This commit is contained in:
Kyle Spearrin
2016-12-08 00:56:38 -05:00
parent ced707647f
commit e414dd1867
9 changed files with 80 additions and 75 deletions

View File

@@ -4,9 +4,7 @@
.controller('vaultAddSiteController', function ($scope, $state, $stateParams, siteService, folderService,
cryptoService, $q, toastr, utilsService, $analytics, i18nService) {
$scope.i18n = i18nService;
var returnScrollY = $stateParams.returnScrollY;
var returnSearchText = $stateParams.returnSearchText;
var fromCurrent = $stateParams.from;
var from = $stateParams.from;
$scope.site = {
folderId: null,
@@ -55,16 +53,12 @@
}
else if (from === 'folder') {
$state.go('viewFolder', {
animation: 'out-slide-down',
scrollY: returnScrollY || 0,
searchText: returnSearchText
animation: 'out-slide-down'
});
}
else if(from === 'vault') {
else {
$state.go('tabs.vault', {
animation: 'out-slide-down',
scrollY: returnScrollY || 0,
searchText: returnSearchText
animation: 'out-slide-down'
});
}
};
@@ -75,9 +69,7 @@
animation: 'in-slide-up',
addState: {
from: from,
site: $scope.site,
returnScrollY: returnScrollY,
returnSearchText: returnSearchText
site: $scope.site
}
});
};