Sidebar check siteSign result
This commit is contained in:
parent
3489d5de09
commit
4088c88a56
2 changed files with 14 additions and 9 deletions
|
@ -358,7 +358,8 @@ class Sidebar extends Class
|
||||||
if wrapper.site_info.privatekey or wrapper.site_info.auth_address in res.signers
|
if wrapper.site_info.privatekey or wrapper.site_info.auth_address in res.signers
|
||||||
# Privatekey stored in users.json
|
# Privatekey stored in users.json
|
||||||
wrapper.ws.cmd "siteSign", {privatekey: "stored", inner_path: inner_path, update_changed_files: true}, (res) =>
|
wrapper.ws.cmd "siteSign", {privatekey: "stored", inner_path: inner_path, update_changed_files: true}, (res) =>
|
||||||
wrapper.notifications.add "sign", "done", "#{inner_path} Signed!", 5000
|
if res == "ok"
|
||||||
|
wrapper.notifications.add "sign", "done", "#{inner_path} Signed!", 5000
|
||||||
|
|
||||||
else
|
else
|
||||||
# Ask the user for privatekey
|
# Ask the user for privatekey
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var Class,
|
var Class,
|
||||||
__slice = [].slice;
|
slice = [].slice;
|
||||||
|
|
||||||
Class = (function() {
|
Class = (function() {
|
||||||
function Class() {}
|
function Class() {}
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
Class.prototype.log = function() {
|
Class.prototype.log = function() {
|
||||||
var args;
|
var args;
|
||||||
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
|
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
||||||
if (!this.trace) {
|
if (!this.trace) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -28,23 +28,23 @@
|
||||||
|
|
||||||
Class.prototype.logStart = function() {
|
Class.prototype.logStart = function() {
|
||||||
var args, name;
|
var args, name;
|
||||||
name = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
|
name = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
||||||
if (!this.trace) {
|
if (!this.trace) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.logtimers || (this.logtimers = {});
|
this.logtimers || (this.logtimers = {});
|
||||||
this.logtimers[name] = +(new Date);
|
this.logtimers[name] = +(new Date);
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
this.log.apply(this, ["" + name].concat(__slice.call(args), ["(started)"]));
|
this.log.apply(this, ["" + name].concat(slice.call(args), ["(started)"]));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
Class.prototype.logEnd = function() {
|
Class.prototype.logEnd = function() {
|
||||||
var args, ms, name;
|
var args, ms, name;
|
||||||
name = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
|
name = arguments[0], args = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
||||||
ms = +(new Date) - this.logtimers[name];
|
ms = +(new Date) - this.logtimers[name];
|
||||||
this.log.apply(this, ["" + name].concat(__slice.call(args), ["(Done in " + ms + "ms)"]));
|
this.log.apply(this, ["" + name].concat(slice.call(args), ["(Done in " + ms + "ms)"]));
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ---- plugins/Sidebar/media/RateLimit.coffee ---- */
|
/* ---- plugins/Sidebar/media/RateLimit.coffee ---- */
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,6 +87,7 @@
|
||||||
}).call(this);
|
}).call(this);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ---- plugins/Sidebar/media/Scrollable.js ---- */
|
/* ---- plugins/Sidebar/media/Scrollable.js ---- */
|
||||||
|
|
||||||
|
|
||||||
|
@ -611,7 +613,9 @@ window.initScrollable = function () {
|
||||||
inner_path: inner_path,
|
inner_path: inner_path,
|
||||||
update_changed_files: true
|
update_changed_files: true
|
||||||
}, function(res) {
|
}, function(res) {
|
||||||
return wrapper.notifications.add("sign", "done", inner_path + " Signed!", 5000);
|
if (res === "ok") {
|
||||||
|
return wrapper.notifications.add("sign", "done", inner_path + " Signed!", 5000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return wrapper.displayPrompt("Enter your private key:", "password", "Sign", "", function(privatekey) {
|
return wrapper.displayPrompt("Enter your private key:", "password", "Sign", "", function(privatekey) {
|
||||||
|
@ -682,7 +686,7 @@ window.initScrollable = function () {
|
||||||
return img.onload = (function(_this) {
|
return img.onload = (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
return wrapper.ws.cmd("sidebarGetPeers", [], function(globe_data) {
|
return wrapper.ws.cmd("sidebarGetPeers", [], function(globe_data) {
|
||||||
var e, error, ref, ref1;
|
var e, ref, ref1;
|
||||||
if (_this.globe) {
|
if (_this.globe) {
|
||||||
_this.globe.scene.remove(_this.globe.points);
|
_this.globe.scene.remove(_this.globe.points);
|
||||||
_this.globe.addData(globe_data, {
|
_this.globe.addData(globe_data, {
|
||||||
|
|
Loading…
Reference in a new issue