1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-02 08:30:14 +01:00

logout confirmation

This commit is contained in:
Kyle Spearrin 2016-09-20 11:40:45 -04:00
parent 5badea2d9d
commit 68b16ea565

View File

@ -9,8 +9,19 @@
}; };
$scope.logOut = function () { $scope.logOut = function () {
loginService.logOut(function () { SweetAlert.swal({
$state.go('login'); title: 'Log out',
text: 'Are you sure you want to log out?',
type: 'warning',
showCancelButton: true,
confirmButtonText: 'Yes',
cancelButtonText: 'Cancel'
}, function (confirmed) {
if (confirmed) {
loginService.logOut(function () {
$state.go('login');
});
}
}); });
}; };