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 () {
|
$('.item-content[data-setting=hideaccountnag] .toggle input').on("change", function () {
|
||||||
var checked = $(this).prop('checked');
|
var checked = $(this).prop('checked');
|
||||||
setStorage("hideaccountnag", 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',
|
templateUrl: './pages/dropandsend.html',
|
||||||
on: {
|
on: {
|
||||||
pageBeforeIn: function () {
|
pageBeforeIn: function () {
|
||||||
checkIfAccountGoodWithPaymentMethod(function (ok) {
|
checkIfAccountGoodWithPaymentMethod(function (ok) {
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
$("#addPaymentMethodNag").css("display", "");
|
$("#addPaymentMethodNag").css("display", "");
|
||||||
}
|
}
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
$("#addPaymentMethodNag").css("display", "");
|
$("#addPaymentMethodNag").css("display", "");
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
pageAfterOut: function () {
|
pageAfterOut: function () {
|
||||||
dropboxMap = null;
|
dropboxMap = null;
|
||||||
@ -264,6 +264,13 @@ var routes = [
|
|||||||
);
|
);
|
||||||
|
|
||||||
settings.push(
|
settings.push(
|
||||||
|
{
|
||||||
|
setting: "resetaccount",
|
||||||
|
title: "Forget Account",
|
||||||
|
text: "Log out and disconnect from your Helena Express account.",
|
||||||
|
onclick: "resetAccountPrompt()",
|
||||||
|
link: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
setting: "versions",
|
setting: "versions",
|
||||||
title: "Helena Express app v" + app_version,
|
title: "Helena Express app v" + app_version,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user