1
0
mirror of https://github.com/bitwarden/web synced 2025-12-16 08:13:22 +00:00

reorganize project folder structure and remove asp.net dependency

This commit is contained in:
Kyle Spearrin
2016-11-30 23:50:00 -05:00
parent a5b8e703fc
commit b72a52232d
94 changed files with 76 additions and 330 deletions

View File

@@ -0,0 +1,24 @@
angular
.module('bit.settings')
.controller('settingsDeleteController', function ($scope, $state, apiService, $uibModalInstance, cryptoService, authService, toastr, $analytics) {
$analytics.eventTrack('settingsDeleteController', { category: 'Modal' });
$scope.submit = function (model) {
var request = {
masterPasswordHash: cryptoService.hashPassword(model.masterPassword)
};
$scope.submitPromise = apiService.accounts.postDelete(request, function () {
$uibModalInstance.dismiss('cancel');
authService.logOut();
$analytics.eventTrack('Deleted Account');
$state.go('frontend.login.info').then(function () {
toastr.success('Your account has been closed and all associated data has been deleted.', 'Account Deleted');
});
}).$promise;
};
$scope.close = function () {
$uibModalInstance.dismiss('cancel');
};
});