From 5be1b3cc78358abd45376b05e9d59fecb67402f8 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 30 Dec 2019 11:36:41 -0500 Subject: 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. --- lib/render-msg.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/render-msg.js') 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 () { -- cgit v1.2.3