git-ssb-web
Advanced tools
Comparing version 2.7.0 to 2.7.1
13
index.js
@@ -580,2 +580,3 @@ var fs = require('fs') | ||
var authorLink = u.link([msg.value.author], msg.authorName) | ||
var privateIconMaybe = msg.value.private ? ' ' + u.privateIcon(req) : '' | ||
switch (c.type) { | ||
@@ -595,3 +596,3 @@ case 'git-repo': | ||
repo: u.link([msg.key], repoName) | ||
}) + ' ' + msgDateLink + '</section>') | ||
}) + ' ' + msgDateLink + privateIconMaybe + '</section>') | ||
}) | ||
@@ -607,3 +608,3 @@ }) | ||
repo: repoLink | ||
}) + ' ' + msgDateLink + | ||
}) + ' ' + msgDateLink + privateIconMaybe + | ||
(msg.value.private ? | ||
@@ -626,3 +627,3 @@ '<br>' + req._t('repo.Recipients') + '<ul>' + | ||
repo: repoLink | ||
}) + ' ' + msgDateLink + '</section>') | ||
}) + ' ' + msgDateLink + privateIconMaybe + '</section>') | ||
}) | ||
@@ -646,3 +647,3 @@ case 'issue': | ||
project: repoLink | ||
}) + ' ' + msgDateLink + '</section>') | ||
}) + ' ' + msgDateLink + privateIconMaybe + '</section>') | ||
}) | ||
@@ -656,3 +657,3 @@ }) | ||
name: u.link([c.about], c.name) | ||
}) + ' ' + msgDateLink + '</section>') | ||
}) + ' ' + msgDateLink + privateIconMaybe + '</section>') | ||
case 'post': | ||
@@ -670,3 +671,3 @@ return this.pullReqs.get(c.issue, function (err, pr) { | ||
title: u.link([pr.id], pr.title, true) | ||
}) + ' ' + msgDateLink + | ||
}) + ' ' + msgDateLink + privateIconMaybe + | ||
(c.text ? '<blockquote>' + markdown(c.text) + '</blockquote>' : '') + | ||
@@ -673,0 +674,0 @@ '</section>') |
@@ -163,6 +163,2 @@ var url = require('url') | ||
function privateIcon(req) { | ||
return `<img src="/emoji/lock.png" height="16" width="16" alt="${req._t('repo.Private')}" title="${req._t('repo.RepoIsPrivate')}">` | ||
} | ||
R.serveRepoTemplate = function (req, repo, page, branch, titleTemplate, body) { | ||
@@ -242,3 +238,3 @@ var self = this | ||
forms.name(req, isLocal, repo.id, repoName, 'repo-name', null, req._t('repo.Rename'), | ||
h('h2', {class: 'bgslash'}, `${u.link([repo.feed], authorName)} / ${u.link([repo.id], repoName)}${repo.private ? ' ' + privateIcon(req) : ''}`) | ||
h('h2', {class: 'bgslash'}, `${u.link([repo.feed], authorName)} / ${u.link([repo.id], repoName)}${repo.private ? ' ' + u.privateIcon(req) : ''}`) | ||
), | ||
@@ -245,0 +241,0 @@ ]), |
@@ -202,3 +202,3 @@ var pull = require('pull-stream') | ||
sbot.private.unbox(msg.value.content, function (err, content) { | ||
if (err) return cb(null, msg) // leave message encrypted | ||
if (err || !content) return cb(null, msg) // leave message encrypted | ||
var msg1 = {} | ||
@@ -240,1 +240,5 @@ for (var k in msg) msg1[k] = msg[k] | ||
} | ||
u.privateIcon = function (req) { | ||
return `<img src="/emoji/lock.png" height="16" width="16" alt="${req._t('repo.Private')}" title="${req._t('repo.RepoIsPrivate')}">` | ||
} |
{ | ||
"name": "git-ssb-web", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "web server for browsing git repos on ssb", | ||
@@ -5,0 +5,0 @@ "bin": "server.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
305255
4354