git ssb

30+

cel / git-ssb-web



Commit 070b1ef1e037e32bba67fbd318030e6fe6a1de38

Format commit view nicer

Charles Lehner committed on 3/28/2016, 1:15:27 AM
Parent: ba35140393d2e15babd09d75d8ad132e431ba4cf

Files changed

index.jschanged
index.jsView
@@ -1043,11 +1043,10 @@
10431043 repo.getCommitParsed(rev, function (err, commit) {
10441044 if (err) return cb(err)
10451045 var commitPath = [repo.id, 'commit', commit.id]
10461046 var treePath = [repo.id, 'tree', commit.tree]
1047- cb(null,
1048- '<p><strong>' + link(commitPath, commit.title) +
1049- '</strong></p>' +
1047+ cb(null, '<section class="collapse">' +
1048+ '<strong>' + link(commitPath, commit.title) + '</strong>' +
10501049 pre(commit.body) +
10511050 '<p>' +
10521051 (commit.separateAuthor ? escapeHTML(commit.author.name) +
10531052 ' authored on ' + commit.author.date.toLocaleString() + '<br>'
@@ -1056,11 +1055,10 @@
10561055 commit.committer.date.toLocaleString() + '</p>' +
10571056 '<p>' + commit.parents.map(function (id) {
10581057 return 'Parent: ' + link([repo.id, 'commit', id], id)
10591058 }).join('<br>') + '</p>' +
1060- '<p>' +
1061- (commit.tree ? 'Tree: ' + link(treePath) : 'No tree') +
1062- '</p>')
1059+ (commit.tree ? 'Tree: ' + link(treePath) : 'No tree') +
1060+ '</section>')
10631061 })
10641062 })
10651063 ]))
10661064 }

Built with git-ssb-web