git ssb

0+

Daan Patchwork / ssb-viewer



forked from cel / ssb-viewer

Commit 1a47f5f10e7f528233fc2adfe33565b40ecb322f

Render git update more semantically

cel committed on 9/1/2018, 1:55:40 AM
Parent: 45a18976ee628f722a4322d3d7fa61970d08af4f

Files changed

render.jschanged
render.jsView
@@ -489,15 +489,16 @@
489489 return h('span.status',
490490 "Created a git repo " + c.name);
491491 }
492492 else if (c.type == "git-update") {
493- var s = h('span.status');
494- s.innerHTML = "Did a git update " +
495- (c.repoName != undefined ? " in repo " + escape(c.repoName) : "") +
496- '<br>' +
497- (Array.isArray(c.commits) ?
498- c.commits.filter(Boolean).map(com => { return "-" +escape(com.title || com.sha1); }).join('<br>') : "");
499- return s;
493+ return h('div.status', "Did a git update " +
494+ (c.repoName ? " in repo " + c.repoName : ""),
495+ (Array.isArray(c.commits) ? h('ul',
496+ c.commits.filter(Boolean).map(com => {
497+ return h('li', String(com.title || com.sha1))
498+ })
499+ ) : "")
500+ )
500501 }
501502 else if (c.type == "ssb-dns") {
502503 return [h('span.status', 'Updated DNS'), renderDefault(c)];
503504 }

Built with git-ssb-web