mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 23:33:31 +00:00
from state passed around
This commit is contained in:
@@ -6,7 +6,7 @@ angular
|
||||
$scope.i18n = i18nService;
|
||||
var returnScrollY = $stateParams.returnScrollY;
|
||||
var returnSearchText = $stateParams.returnSearchText;
|
||||
var fromCurrent = $stateParams.fromCurrent;
|
||||
var from = $stateParams.from;
|
||||
|
||||
$scope.site = null;
|
||||
siteService.get($stateParams.siteId, function (site) {
|
||||
@@ -49,16 +49,23 @@ angular
|
||||
fromView: true,
|
||||
returnScrollY: returnScrollY || 0,
|
||||
returnSearchText: returnSearchText,
|
||||
fromCurrent: fromCurrent
|
||||
from: from
|
||||
});
|
||||
};
|
||||
|
||||
$scope.close = function () {
|
||||
if (fromCurrent) {
|
||||
if (from === 'current') {
|
||||
$state.go('tabs.current', {
|
||||
animation: 'out-slide-down'
|
||||
});
|
||||
}
|
||||
else if (from === 'folder') {
|
||||
$state.go('viewFolder', {
|
||||
animation: 'out-slide-down',
|
||||
scrollY: returnScrollY || 0,
|
||||
searchText: returnSearchText
|
||||
});
|
||||
}
|
||||
else {
|
||||
$state.go('tabs.vault', {
|
||||
animation: 'out-slide-down',
|
||||
|
||||
Reference in New Issue
Block a user