Render git update more semantically

This commit is contained in:
cel
2018-08-31 18:55:40 -07:00
parent 45a18976ee
commit 1a47f5f10e
+8 -7
View File
@@ -490,13 +490,14 @@ function render(opts, id, c) {
"Created a git repo " + c.name); "Created a git repo " + c.name);
} }
else if (c.type == "git-update") { else if (c.type == "git-update") {
var s = h('span.status'); return h('div.status', "Did a git update " +
s.innerHTML = "Did a git update " + (c.repoName ? " in repo " + c.repoName : ""),
(c.repoName != undefined ? " in repo " + escape(c.repoName) : "") + (Array.isArray(c.commits) ? h('ul',
'<br>' + c.commits.filter(Boolean).map(com => {
(Array.isArray(c.commits) ? return h('li', String(com.title || com.sha1))
c.commits.filter(Boolean).map(com => { return "-" +escape(com.title || com.sha1); }).join('<br>') : ""); })
return s; ) : "")
)
} }
else if (c.type == "ssb-dns") { else if (c.type == "ssb-dns") {
return [h('span.status', 'Updated DNS'), renderDefault(c)]; return [h('span.status', 'Updated DNS'), renderDefault(c)];