git ssb

16+

cel / patchfoo



Commit ef2fab24f57268bc2a96e74078855dfad047fd5b

Render npm-packages dependencyBranch, versionBranch

cel committed on 12/7/2017, 12:01:59 AM
Parent: 00885846f2c98059a4b95b2d18b4a4a8f22f7901

Files changed

lib/render-msg.jschanged
lib/render-msg.jsView
@@ -1061,11 +1061,25 @@
10611061 }
10621062
10631063 RenderMsg.prototype.npmPackages = function (cb) {
10641064 var self = this
1065 + var done = multicb({pluck: 1, spread: true})
1066 + var elCb = done()
1067 + function renderIdLink(id) {
1068 + return [h('a', {href: self.toUrl(id)}, truncate(id, 8)), ' ']
1069 + }
10651070 self.render.npmPackageMentions(self.c.mentions, function (err, el) {
10661071 if (err) return cb(err)
1067- self.wrap(el, cb)
1072 + self.wrap(h('div', [
1073 + el,
1074 + Array.isArray(self.c.dependencyBranch) ? h('div',
1075 + 'dependencies via: ', self.c.dependencyBranch.map(renderIdLink)
1076 + ) : '',
1077 + Array.isArray(self.c.versionBranch) ? h('div',
1078 + 'previous versions: ', self.c.versionBranch.map(renderIdLink)
1079 + ) : ''
1080 + ]), elCb)
1081 + return done(cb)
10681082 })
10691083 }
10701084
10711085 RenderMsg.prototype.npmPrebuilds = function (cb) {

Built with git-ssb-web