Confirmation of private key forgot
This commit is contained in:
parent
c70e3bb3dd
commit
678f4102a5
2 changed files with 12 additions and 4 deletions
|
@ -210,6 +210,9 @@ class Sidebar extends Class
|
||||||
return false
|
return false
|
||||||
|
|
||||||
@tag.find("#privatekey-forgot").off("click, touchend").on "click touchend", (e) =>
|
@tag.find("#privatekey-forgot").off("click, touchend").on "click touchend", (e) =>
|
||||||
|
@wrapper.displayConfirm "Remove saved prive key for this site?", "Forgot", (res) =>
|
||||||
|
if not res
|
||||||
|
return false
|
||||||
@wrapper.ws.cmd "userSetSitePrivatekey", [""], (res) =>
|
@wrapper.ws.cmd "userSetSitePrivatekey", [""], (res) =>
|
||||||
@wrapper.notifications.add "privatekey", "done", "Saved private key removed", 5000
|
@wrapper.notifications.add "privatekey", "done", "Saved private key removed", 5000
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -608,9 +608,14 @@ window.initScrollable = function () {
|
||||||
})(this));
|
})(this));
|
||||||
return this.tag.find("#privatekey-forgot").off("click, touchend").on("click touchend", (function(_this) {
|
return this.tag.find("#privatekey-forgot").off("click, touchend").on("click touchend", (function(_this) {
|
||||||
return function(e) {
|
return function(e) {
|
||||||
_this.wrapper.ws.cmd("userSetSitePrivatekey", [""], function(res) {
|
_this.wrapper.displayConfirm("Remove saved prive key for this site?", "Forgot", function(res) {
|
||||||
|
if (!res) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return _this.wrapper.ws.cmd("userSetSitePrivatekey", [""], function(res) {
|
||||||
return _this.wrapper.notifications.add("privatekey", "done", "Saved private key removed", 5000);
|
return _this.wrapper.notifications.add("privatekey", "done", "Saved private key removed", 5000);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
})(this));
|
})(this));
|
||||||
|
|
Loading…
Reference in a new issue