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