Merge branch 'py3' of https://github.com/HelloZeroNet/ZeroNet into py3
This commit is contained in:
commit
6bb929a896
2 changed files with 4 additions and 4 deletions
|
@ -482,7 +482,7 @@ class UiWebsocketPlugin(object):
|
|||
def sidebarRenderContents(self, body, site):
|
||||
has_privatekey = bool(self.user.getSiteData(site.address, create=False).get("privatekey"))
|
||||
if has_privatekey:
|
||||
tag_privatekey = _("{_[Private key saved.]} <a href='#Forgot+private+key' id='privatekey-forgot' class='link-right'>{_[Forgot]}</a>")
|
||||
tag_privatekey = _("{_[Private key saved.]} <a href='#Forget+private+key' id='privatekey-forget' class='link-right'>{_[Forget]}</a>")
|
||||
else:
|
||||
tag_privatekey = _("<a href='#Add+private+key' id='privatekey-add' class='link-right'>{_[Add saved private key]}</a>")
|
||||
|
||||
|
|
|
@ -204,15 +204,15 @@ class Sidebar extends Class
|
|||
return true
|
||||
}
|
||||
|
||||
# Save and forgot privatekey for site signing
|
||||
# Save and forget privatekey for site signing
|
||||
@tag.find("#privatekey-add").off("click, touchend").on "click touchend", (e) =>
|
||||
@wrapper.displayPrompt "Enter your private key:", "password", "Save", "", (privatekey) =>
|
||||
@wrapper.ws.cmd "userSetSitePrivatekey", [privatekey], (res) =>
|
||||
@wrapper.notifications.add "privatekey", "done", "Private key saved for site signing", 5000
|
||||
return false
|
||||
|
||||
@tag.find("#privatekey-forgot").off("click, touchend").on "click touchend", (e) =>
|
||||
@wrapper.displayConfirm "Remove saved private key for this site?", "Forgot", (res) =>
|
||||
@tag.find("#privatekey-forget").off("click, touchend").on "click touchend", (e) =>
|
||||
@wrapper.displayConfirm "Remove saved private key for this site?", "Forget", (res) =>
|
||||
if not res
|
||||
return false
|
||||
@wrapper.ws.cmd "userSetSitePrivatekey", [""], (res) =>
|
||||
|
|
Loading…
Reference in a new issue