1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 10:43:35 +00:00

remove share login modal and add organizations box

This commit is contained in:
Kyle Spearrin
2017-02-28 23:43:54 -05:00
parent 0d2e296eda
commit 05a92ebd26
6 changed files with 27 additions and 112 deletions

View File

@@ -1,33 +0,0 @@
angular
.module('bit.vault')
.controller('vaultShareLoginController', function ($scope, apiService, $uibModalInstance, cryptoService, cipherService,
id, $analytics) {
$analytics.eventTrack('vaultShareLoginController', { category: 'Modal' });
apiService.logins.get({
id: id
}, function (login) {
$scope.login = cipherService.decryptLogin(login);
});
$scope.enablePromise = null;
$scope.enable = function () {
var shareKey = cryptoService.makeShareKey();
var encLogin = cipherService.encryptLogin($scope.login, shareKey);
encLogin.key = cryptoService.rsaEncrypt(shareKey);
$scope.enablePromise = apiService.logins.put({ id: $scope.login.id }, encLogin, function (login) {
$scope.login = cipherService.decryptLogin(login);
}).$promise;
};
$scope.sharePromise = null;
$scope.share = function () {
$uibModalInstance.close({});
};
$scope.close = function () {
$uibModalInstance.dismiss('cancel');
};
});