Add setting button to reset/forget/log out of account
This commit is contained in:
parent
0873ccee90
commit
77287dc92a
@ -31,4 +31,12 @@ $('.item-link[data-setting=mapsource] select').on("change", function () {
|
||||
$('.item-content[data-setting=hideaccountnag] .toggle input').on("change", function () {
|
||||
var checked = $(this).prop('checked');
|
||||
setStorage("hideaccountnag", checked);
|
||||
});
|
||||
});
|
||||
|
||||
function resetAccountPrompt() {
|
||||
app.dialog.confirm("Are you sure you want to log out?", function () {
|
||||
removeFromStorage("phonenumber");
|
||||
removeFromStorage("accountkey");
|
||||
restartApplication();
|
||||
});
|
||||
}
|
@ -133,13 +133,13 @@ var routes = [
|
||||
templateUrl: './pages/dropandsend.html',
|
||||
on: {
|
||||
pageBeforeIn: function () {
|
||||
checkIfAccountGoodWithPaymentMethod(function (ok) {
|
||||
if (!ok) {
|
||||
$("#addPaymentMethodNag").css("display", "");
|
||||
}
|
||||
}, function (error) {
|
||||
$("#addPaymentMethodNag").css("display", "");
|
||||
});
|
||||
checkIfAccountGoodWithPaymentMethod(function (ok) {
|
||||
if (!ok) {
|
||||
$("#addPaymentMethodNag").css("display", "");
|
||||
}
|
||||
}, function (error) {
|
||||
$("#addPaymentMethodNag").css("display", "");
|
||||
});
|
||||
},
|
||||
pageAfterOut: function () {
|
||||
dropboxMap = null;
|
||||
@ -264,6 +264,13 @@ var routes = [
|
||||
);
|
||||
|
||||
settings.push(
|
||||
{
|
||||
setting: "resetaccount",
|
||||
title: "Forget Account",
|
||||
text: "Log out and disconnect from your Helena Express account.",
|
||||
onclick: "resetAccountPrompt()",
|
||||
link: true
|
||||
},
|
||||
{
|
||||
setting: "versions",
|
||||
title: "Helena Express app v" + app_version,
|
||||
|
Loading…
x
Reference in New Issue
Block a user