Lowercase
This commit is contained in:
parent
7121a96ebd
commit
f2c76c0a3b
2 changed files with 37 additions and 1 deletions
|
@ -429,7 +429,7 @@ class UiWebsocketPlugin(object):
|
||||||
<div class='flex'>
|
<div class='flex'>
|
||||||
<input type='text' class='text' value="content.json" id='input-contents'/>
|
<input type='text' class='text' value="content.json" id='input-contents'/>
|
||||||
<span href='#Sign-and-Publish' class='button' id='button-sign-publish'>
|
<span href='#Sign-and-Publish' class='button' id='button-sign-publish'>
|
||||||
{_[Sign and Publish]}
|
{_[Sign and publish]}
|
||||||
<span id='button-sign-publish-arrow'>v</span>
|
<span id='button-sign-publish-arrow'>v</span>
|
||||||
<div id='button-sign-publish-menu'>
|
<div id='button-sign-publish-menu'>
|
||||||
<a href='#Sign' class='button' id='button-sign'>{_[Sign]}</a><br>
|
<a href='#Sign' class='button' id='button-sign'>{_[Sign]}</a><br>
|
||||||
|
|
|
@ -617,6 +617,42 @@ window.initScrollable = function () {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
})(this));
|
})(this));
|
||||||
|
this.tag.find("#button-sign-publish").off("click touchend").on("click touchend", (function(_this) {
|
||||||
|
return function() {
|
||||||
|
var inner_path;
|
||||||
|
inner_path = _this.tag.find("#input-contents").val();
|
||||||
|
wrapper.ws.cmd("fileRules", {
|
||||||
|
inner_path: inner_path
|
||||||
|
}, function(res) {
|
||||||
|
var ref;
|
||||||
|
if (wrapper.site_info.privatekey || (ref = wrapper.site_info.auth_address, indexOf.call(res.signers, ref) >= 0)) {
|
||||||
|
return wrapper.ws.cmd("sitePublish", {
|
||||||
|
privatekey: "stored",
|
||||||
|
inner_path: inner_path,
|
||||||
|
sign: true
|
||||||
|
}, function(res) {
|
||||||
|
if (res === "ok") {
|
||||||
|
return wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
return wrapper.displayPrompt("Enter your private key:", "password", "Sign", "", function(privatekey) {
|
||||||
|
return wrapper.ws.cmd("sitePublish", {
|
||||||
|
privatekey: privatekey,
|
||||||
|
inner_path: inner_path,
|
||||||
|
sign: true
|
||||||
|
}, function(res) {
|
||||||
|
if (res === "ok") {
|
||||||
|
return wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
_this.tag.find("#button-sign-publish-menu").removeClass("visible");
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
})(this));
|
||||||
this.tag.find("#button-sign").off("click touchend").on("click touchend", (function(_this) {
|
this.tag.find("#button-sign").off("click touchend").on("click touchend", (function(_this) {
|
||||||
return function() {
|
return function() {
|
||||||
var inner_path;
|
var inner_path;
|
||||||
|
|
Loading…
Reference in a new issue