mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
pass folderId to add site
This commit is contained in:
parent
e414dd1867
commit
61f205b4b8
@ -107,17 +107,14 @@
|
||||
templateUrl: 'app/vault/views/vaultAddSite.html',
|
||||
controller: 'vaultAddSiteController',
|
||||
data: { authorize: true },
|
||||
params: { animation: null, name: null, uri: null, site: null, from: 'vault' }
|
||||
params: { animation: null, name: null, uri: null, folderId: null, site: null, from: 'vault' }
|
||||
})
|
||||
.state('editSite', {
|
||||
url: '/edit-site?siteId',
|
||||
templateUrl: 'app/vault/views/vaultEditSite.html',
|
||||
controller: 'vaultEditSiteController',
|
||||
data: { authorize: true },
|
||||
params: {
|
||||
animation: null, fromView: true, returnScrollY: 0,
|
||||
returnSearchText: null, site: null, from: 'vault'
|
||||
}
|
||||
params: { animation: null, fromView: true, site: null, from: 'vault' }
|
||||
})
|
||||
|
||||
.state('passwordGenerator', {
|
||||
|
@ -4,10 +4,11 @@
|
||||
.controller('vaultAddSiteController', function ($scope, $state, $stateParams, siteService, folderService,
|
||||
cryptoService, $q, toastr, utilsService, $analytics, i18nService) {
|
||||
$scope.i18n = i18nService;
|
||||
var from = $stateParams.from;
|
||||
var from = $stateParams.from,
|
||||
folderId = $stateParams.folderId;
|
||||
|
||||
$scope.site = {
|
||||
folderId: null,
|
||||
folderId: folderId,
|
||||
name: $stateParams.name,
|
||||
uri: $stateParams.uri
|
||||
};
|
||||
@ -53,7 +54,8 @@
|
||||
}
|
||||
else if (from === 'folder') {
|
||||
$state.go('viewFolder', {
|
||||
animation: 'out-slide-down'
|
||||
animation: 'out-slide-down',
|
||||
folderId: folderId
|
||||
});
|
||||
}
|
||||
else {
|
||||
|
@ -150,7 +150,8 @@
|
||||
storeState();
|
||||
$state.go('addSite', {
|
||||
animation: 'in-slide-up',
|
||||
from: 'folder'
|
||||
from: 'folder',
|
||||
folderId: $scope.folder.id
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user