1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-20 07:40:57 +02:00
bitwarden-browser/src/popup/app/vault/vaultAddSiteController.js

22 lines
609 B
JavaScript
Raw Normal View History

2016-09-03 22:48:39 +02:00
angular
.module('bit.vault')
.controller('vaultAddSiteController', function ($scope, siteService, cipherService) {
2016-09-04 03:45:45 +02:00
$scope.site = {
folderId: null
};
$scope.createSite = function (model) {
cipherService.encryptSite(model, function (siteModel) {
var site = new Site(siteModel, true);
siteService.saveWithServer(site, function () {
$scope.close();
});
2016-09-04 03:45:45 +02:00
});
};
$scope.close = function () {
$scope.parentScope.closeAddSite();
};
2016-09-03 22:48:39 +02:00
});