Commit ef2fab24f57268bc2a96e74078855dfad047fd5b
Render npm-packages dependencyBranch, versionBranch
cel committed on 12/7/2017, 12:01:59 AMParent: 00885846f2c98059a4b95b2d18b4a4a8f22f7901
Files changed
lib/render-msg.js | changed |
lib/render-msg.js | |||
---|---|---|---|
@@ -1061,11 +1061,25 @@ | |||
1061 | 1061 … | } | |
1062 | 1062 … | ||
1063 | 1063 … | RenderMsg.prototype.npmPackages = function (cb) { | |
1064 | 1064 … | 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 … | + } | ||
1065 | 1070 … | self.render.npmPackageMentions(self.c.mentions, function (err, el) { | |
1066 | 1071 … | 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) | ||
1068 | 1082 … | }) | |
1069 | 1083 … | } | |
1070 | 1084 … | ||
1071 | 1085 … | RenderMsg.prototype.npmPrebuilds = function (cb) { |
Built with git-ssb-web