diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-12-30 11:36:41 -0500 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-12-31 22:04:23 -0500 |
commit | 5be1b3cc78358abd45376b05e9d59fecb67402f8 (patch) | |
tree | 0b9f565c108ea70f592e64e7fb840ba6b158a9d8 /lib/render-msg.js | |
parent | b729872005ad1fea03e7c96e496823c0784c75c1 (diff) | |
download | patchfoo-5be1b3cc78358abd45376b05e9d59fecb67402f8.tar.gz patchfoo-5be1b3cc78358abd45376b05e9d59fecb67402f8.zip |
Add printView and noThread query string options
- printView: no nav header, footer, action links, composer, or avatar.
- noThread: show only the target message, no replies/mentions.
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r-- | lib/render-msg.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 63489ff..dfface0 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -128,6 +128,7 @@ RenderMsg.prototype.wrap = function (content, cb) { var done = multicb({pluck: 1, spread: true}) done()(null, [h('tr.msg-row', h('td.msg-left', + this.serve.noAvatar ? '' : h('div', this.render.avatarImage(this.msg.value.author, done())), h('div', this.render.idLinkCopyable(this.msg.value.author, done())), this.recpsLine(done()) @@ -192,6 +193,7 @@ RenderMsg.prototype.wrapMini = function (content, cb) { RenderMsg.prototype.actions = function (mini) { var lastMove var ooo = this.serve && this.serve.query.ooo + if (this.serve.noActions) return return this.msg.key ? h('form', {method: 'post', action: ''}, this.msg.rel ? [this.msg.rel, ' '] : '', @@ -240,8 +242,11 @@ RenderMsg.prototype.recpsLine = function (cb) { var recpsNotAuthor = recps.filter(function (link) { return u.linkDest(link) !== author }) - var isAuthorRecp = recpsNotAuthor.length < recps.length - return this.render.privateLine(recpsNotAuthor, isAuthorRecp, cb) + return this.render.privateLine({ + recps: recpsNotAuthor, + isAuthorRecp: recpsNotAuthor.length < recps.length, + noLockIcon: this.serve.noLockIcon + }, cb) } RenderMsg.prototype.recpsIds = function () { |