Sign automatically on sidebar save button if possible

This commit is contained in:
shortcutme 2017-08-09 14:15:44 +02:00
parent 6a1c5d96ac
commit bdb5e1597c
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 9 additions and 0 deletions

View file

@ -349,6 +349,8 @@ class Sidebar extends Class
wrapper.notifications.add "file-write", "error", "File write error: #{res}"
else
wrapper.notifications.add "file-write", "done", "Site settings saved!", 5000
if wrapper.site_info.privatekey
wrapper.ws.cmd "siteSign", {privatekey: "stored", inner_path: "content.json", update_changed_files: true}
@updateHtmlTag()
return false

View file

@ -593,6 +593,13 @@ window.initScrollable = function () {
return wrapper.notifications.add("file-write", "error", "File write error: " + res);
} else {
wrapper.notifications.add("file-write", "done", "Site settings saved!", 5000);
if (wrapper.site_info.privatekey) {
wrapper.ws.cmd("siteSign", {
privatekey: "stored",
inner_path: "content.json",
update_changed_files: true
});
}
return _this.updateHtmlTag();
}
});