mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-10 01:28:36 +02: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',
|
templateUrl: 'app/vault/views/vaultAddSite.html',
|
||||||
controller: 'vaultAddSiteController',
|
controller: 'vaultAddSiteController',
|
||||||
data: { authorize: true },
|
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', {
|
.state('editSite', {
|
||||||
url: '/edit-site?siteId',
|
url: '/edit-site?siteId',
|
||||||
templateUrl: 'app/vault/views/vaultEditSite.html',
|
templateUrl: 'app/vault/views/vaultEditSite.html',
|
||||||
controller: 'vaultEditSiteController',
|
controller: 'vaultEditSiteController',
|
||||||
data: { authorize: true },
|
data: { authorize: true },
|
||||||
params: {
|
params: { animation: null, fromView: true, site: null, from: 'vault' }
|
||||||
animation: null, fromView: true, returnScrollY: 0,
|
|
||||||
returnSearchText: null, site: null, from: 'vault'
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
.state('passwordGenerator', {
|
.state('passwordGenerator', {
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
.controller('vaultAddSiteController', function ($scope, $state, $stateParams, siteService, folderService,
|
.controller('vaultAddSiteController', function ($scope, $state, $stateParams, siteService, folderService,
|
||||||
cryptoService, $q, toastr, utilsService, $analytics, i18nService) {
|
cryptoService, $q, toastr, utilsService, $analytics, i18nService) {
|
||||||
$scope.i18n = i18nService;
|
$scope.i18n = i18nService;
|
||||||
var from = $stateParams.from;
|
var from = $stateParams.from,
|
||||||
|
folderId = $stateParams.folderId;
|
||||||
|
|
||||||
$scope.site = {
|
$scope.site = {
|
||||||
folderId: null,
|
folderId: folderId,
|
||||||
name: $stateParams.name,
|
name: $stateParams.name,
|
||||||
uri: $stateParams.uri
|
uri: $stateParams.uri
|
||||||
};
|
};
|
||||||
@ -53,7 +54,8 @@
|
|||||||
}
|
}
|
||||||
else if (from === 'folder') {
|
else if (from === 'folder') {
|
||||||
$state.go('viewFolder', {
|
$state.go('viewFolder', {
|
||||||
animation: 'out-slide-down'
|
animation: 'out-slide-down',
|
||||||
|
folderId: folderId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -150,7 +150,8 @@
|
|||||||
storeState();
|
storeState();
|
||||||
$state.go('addSite', {
|
$state.go('addSite', {
|
||||||
animation: 'in-slide-up',
|
animation: 'in-slide-up',
|
||||||
from: 'folder'
|
from: 'folder',
|
||||||
|
folderId: $scope.folder.id
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user