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

from state passed around

This commit is contained in:
Kyle Spearrin
2016-12-07 00:07:01 -05:00
parent 4476eb7389
commit d16b9920ec
8 changed files with 34 additions and 19 deletions

View File

@@ -6,7 +6,7 @@
$scope.i18n = i18nService;
var returnScrollY = $stateParams.returnScrollY;
var returnSearchText = $stateParams.returnSearchText;
var fromCurrent = $stateParams.fromCurrent || $stateParams.uri !== null;
var fromCurrent = $stateParams.from;
$scope.site = {
folderId: null,
@@ -48,12 +48,19 @@
};
$scope.close = function () {
if (fromCurrent) {
if (from === 'current') {
$state.go('tabs.current', {
animation: 'out-slide-down'
});
}
else {
else if (from === 'folder') {
$state.go('viewFolder', {
animation: 'out-slide-down',
scrollY: returnScrollY || 0,
searchText: returnSearchText
});
}
else if(from === 'vault') {
$state.go('tabs.vault', {
animation: 'out-slide-down',
scrollY: returnScrollY || 0,
@@ -67,7 +74,7 @@
$state.go('passwordGenerator', {
animation: 'in-slide-up',
addState: {
fromCurrent: fromCurrent,
from: from,
site: $scope.site,
returnScrollY: returnScrollY,
returnSearchText: returnSearchText