git ssb

30+

cel / git-ssb-web



Commit ffa2c61fc246f99bb8e6115e732fbce4bfdd80d4

Indicate forked repo

Charles Lehner committed on 4/4/2016, 9:59:59 PM
Parent: 5b9b6c8d3576eb860e4d8fb8387f6d31f5467a21

Files changed

index.jschanged
static/styles.csschanged
index.jsView
@@ -1019,12 +1019,20 @@
10191019 getRepoName(about, repo.feed, repo.id, done())
10201020 about.getName(repo.feed, done())
10211021 getVotes(repo.id, done())
10221022
1023+ if (repo.upstream) {
1024+ getRepoName(about, repo.upstream.feed, repo.upstream.id, done())
1025+ about.getName(repo.upstream.feed, done())
1026+ }
1027+
10231028 return readNext(function (cb) {
1024- done(function (err, repoName, authorName, votes) {
1029+ done(function (err, repoName, authorName, votes,
1030+ upstreamName, upstreamAuthorName) {
10251031 if (err) return cb(null, serveError(err))
10261032 var upvoted = votes.upvoters[myId] > 0
1033+ var upstreamLink = !repo.upstream ? '' :
1034+ link([repo.upstream])
10271035 cb(null, serveTemplate(repo.id)(cat([
10281036 pull.once(
10291037 '<div class="repo-title">' +
10301038 '<form class="right-bar" action="" method="post">' +
@@ -1043,8 +1051,13 @@
10431051 'Rename the repo',
10441052 '<h2>' + link([repo.feed], authorName) + ' / ' +
10451053 link([repo.id], repoName) + '</h2>') +
10461054 '</div>' +
1055+ (repo.upstream ?
1056+ '<small>forked from ' +
1057+ link([repo.upstream.feed], upstreamAuthorName) + '\'s ' +
1058+ link([repo.upstream.id], upstreamName) +
1059+ '</small>' : '') +
10471060 nav([
10481061 [[repo.id], 'Code', 'code'],
10491062 [[repo.id, 'activity'], 'Activity', 'activity'],
10501063 [[repo.id, 'commits', branch || ''], 'Commits', 'commits'],
static/styles.cssView
@@ -92,13 +92,14 @@
9292
9393 /* repo page */
9494
9595 .repo-title {
96- height: 2.4em;
96+ height: 2em;
9797 }
9898
9999 .repo-title h2 {
100100 color: #888;
101+ height: 1.2em;
101102 }
102103
103104 .petname h2,
104105 .petname h3 {

Built with git-ssb-web