mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-29 12:55:21 +01:00
handle user upgrade path for lock options gracefully with a log out prompt. Fixed log out bug on lock page.
This commit is contained in:
parent
eff7e5431b
commit
a462f728d3
@ -7,21 +7,19 @@
|
||||
$('#master-password').focus();
|
||||
|
||||
$scope.logOut = function () {
|
||||
loginService.logOut(function () {
|
||||
SweetAlert.swal({
|
||||
title: 'Log Out',
|
||||
text: 'Are you sure you want to log out?',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'Cancel'
|
||||
}, function (confirmed) {
|
||||
if (confirmed) {
|
||||
loginService.logOut(function () {
|
||||
$analytics.eventTrack('Logged Out');
|
||||
$state.go('home');
|
||||
});
|
||||
}
|
||||
});
|
||||
SweetAlert.swal({
|
||||
title: 'Log Out',
|
||||
text: 'Are you sure you want to log out?',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'Cancel'
|
||||
}, function (confirmed) {
|
||||
if (confirmed) {
|
||||
loginService.logOut(function () {
|
||||
$analytics.eventTrack('Logged Out');
|
||||
$state.go('home');
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -34,7 +34,29 @@
|
||||
}
|
||||
|
||||
chrome.storage.local.set(obj, function () {
|
||||
cryptoService.toggleKey(function () { });
|
||||
cryptoService.getKeyHash(false, function (keyHash) {
|
||||
if (keyHash) {
|
||||
cryptoService.toggleKey(function () { });
|
||||
}
|
||||
else {
|
||||
SweetAlert.swal({
|
||||
title: 'Logging out',
|
||||
text: 'You\'ve recently updated to v1.2.0. You must re-log in to change your lock options.' +
|
||||
'Do you want to log out now?',
|
||||
showCancelButton: true,
|
||||
confirmButtonText: 'Yes',
|
||||
cancelButtonText: 'Cancel'
|
||||
}, function (confirmed) {
|
||||
if (confirmed) {
|
||||
cryptoService.toggleKey(function () { });
|
||||
loginService.logOut(function () {
|
||||
$analytics.eventTrack('Logged Out');
|
||||
$state.go('home');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user