From 61de550271bb370ae1e93c29fc5fcece38087d9a Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 26 Nov 2018 22:24:06 -1000 Subject: Link to branches for mini messages --- lib/render-msg.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/render-msg.js') diff --git a/lib/render-msg.js b/lib/render-msg.js index ca07dd8..c529b4f 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -150,18 +150,22 @@ RenderMsg.prototype.wrapMini = function (content, cb) { }, htime(date)), ' ', this.issues(done()), content), - h('td.msg-right', this.actions()) + h('td.msg-right', this.actions(true)) )) done(cb) } -RenderMsg.prototype.actions = function () { +RenderMsg.prototype.actions = function (mini) { var lastMove return this.msg.key ? h('form', {method: 'post', action: ''}, this.msg.rel ? [this.msg.rel, ' '] : '', this.opts.withGt && this.msg.timestamp ? [ h('a', {href: '?gt=' + this.msg.timestamp}, '↓'), ' '] : '', + mini ? u.toLinkArray(this.c.branch).map(function (link) { + return [h('a', {href: this.toUrl(link.link), title: link.link}, + h('small.symbol', '↳')), ' '] + }.bind(this)) : '', this.c.type === 'edit' ? [ h('a', {href: this.toUrl('/edit-diff/' + encodeURIComponent(this.msg.key)), title: 'view post edit diff'}, 'diff'), ' '] : '', -- cgit v1.2.3