Send file updated event to site on signing

This commit is contained in:
shortcutme 2018-06-25 14:33:14 +02:00
parent f671e699e6
commit a59fb4fd1e
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
2 changed files with 9 additions and 6 deletions

View File

@ -416,18 +416,18 @@ class Sidebar extends Class
@wrapper.ws.cmd "fileRules", {inner_path: inner_path}, (res) =>
if @wrapper.site_info.privatekey
# Privatekey stored in users.json
@wrapper.ws.cmd "sitePublish", {privatekey: "stored", inner_path: inner_path, sign: true}, (res) =>
@wrapper.ws.cmd "sitePublish", {privatekey: "stored", inner_path: inner_path, sign: true, update_changed_files: true}, (res) =>
if res == "ok"
@wrapper.notifications.add "sign", "done", "#{inner_path} Signed and published!", 5000
else if @wrapper.site_info.auth_address in res.signers
# ZeroID or other ID provider
@wrapper.ws.cmd "sitePublish", {privatekey: null, inner_path: inner_path, sign: true}, (res) =>
@wrapper.ws.cmd "sitePublish", {privatekey: null, inner_path: inner_path, sign: true, update_changed_files: true}, (res) =>
if res == "ok"
@wrapper.notifications.add "sign", "done", "#{inner_path} Signed and published!", 5000
else
# Ask the user for privatekey
@wrapper.displayPrompt "Enter your private key:", "password", "Sign", "", (privatekey) => # Prompt the private key
@wrapper.ws.cmd "sitePublish", {privatekey: privatekey, inner_path: inner_path, sign: true}, (res) =>
@wrapper.ws.cmd "sitePublish", {privatekey: privatekey, inner_path: inner_path, sign: true, update_changed_files: true}, (res) =>
if res == "ok"
@wrapper.notifications.add "sign", "done", "#{inner_path} Signed and published!", 5000

View File

@ -798,7 +798,8 @@ window.initScrollable = function () {
return _this.wrapper.ws.cmd("sitePublish", {
privatekey: "stored",
inner_path: inner_path,
sign: true
sign: true,
update_changed_files: true
}, function(res) {
if (res === "ok") {
return _this.wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000);
@ -808,7 +809,8 @@ window.initScrollable = function () {
return _this.wrapper.ws.cmd("sitePublish", {
privatekey: null,
inner_path: inner_path,
sign: true
sign: true,
update_changed_files: true
}, function(res) {
if (res === "ok") {
return _this.wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000);
@ -819,7 +821,8 @@ window.initScrollable = function () {
return _this.wrapper.ws.cmd("sitePublish", {
privatekey: privatekey,
inner_path: inner_path,
sign: true
sign: true,
update_changed_files: true
}, function(res) {
if (res === "ok") {
return _this.wrapper.notifications.add("sign", "done", inner_path + " Signed and published!", 5000);