diff options
-rw-r--r-- | lib/serve.js | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/lib/serve.js b/lib/serve.js index 4923667..7df2da9 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -2701,26 +2701,23 @@ Serve.prototype.wrapBinary = function (opts) { }, String(lineNum))), ph('td', ph('pre', self.app.render.highlight(line, ext))) ]), - (lineComments[lineNum] ? - ph('tr', - ph('td', {colspan: 4}, - self.renderLineCommentThread(lineComments[lineNum], id) - ) + lineComments[lineNum] ? ph('tr', + ph('td', {colspan: 4}, + self.renderLineCommentThread(lineComments[lineNum], id) ) - : self.query.comment === id ? - ph('tr', - ph('td', {colspan: 4}, - self.renderLineCommentForm({ - id: id, - line: lineNum, - updateId: updateMsg.key, - repoId: updateMsg.value.content.repo, - commitId: commitId, - filePath: filePath, - }) - ) + ) : '', + self.query.comment === id ? ph('tr', + ph('td', {colspan: 4}, + self.renderLineCommentForm({ + id: id, + line: lineNum, + updateId: updateMsg.key, + repoId: updateMsg.value.content.repo, + commitId: commitId, + filePath: filePath, + }) ) - : '') + ) : '' ] }) ) @@ -2941,6 +2938,11 @@ Serve.prototype.composer = function (opts, cb) { var data = self.data var myId = self.app.sbot.id + if (opts.id && data.composer_id && opts.id !== data.composer_id) { + // don't share data between multiple composers + data = {} + } + if (!data.text && self.query.text) data.text = self.query.text if (!data.action && self.query.action) data.action = self.query.action @@ -3034,6 +3036,7 @@ Serve.prototype.composer = function (opts, cb) { enctype: 'multipart/form-data'}, h('input', {type: 'hidden', name: 'blobs', value: JSON.stringify(blobs)}), + h('input', {type: 'hidden', name: 'composer_id', value: opts.id}), opts.recps ? self.app.render.privateLine(opts.recps, done()) : opts.private ? h('div', h('input.recps-input', {name: 'recps', value: data.recps || '', placeholder: 'recipient ids'})) : '', |