aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-10 17:15:55 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-03-10 17:15:55 -0500
commit02cc78da9251b2ffd896dbf06bbb48e36160edbc (patch)
tree41bad4a0f6b5e52a4d3586bebb3d52233c8dafa7
parent66a1c44a08391be6697a378db3c0b953d2fb766d (diff)
downloadpatchfoo-02cc78da9251b2ffd896dbf06bbb48e36160edbc.tar.gz
patchfoo-02cc78da9251b2ffd896dbf06bbb48e36160edbc.zip
on publish, show only name of new message
-rw-r--r--lib/render.js14
-rw-r--r--lib/serve.js2
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/render.js b/lib/render.js
index eaca499..ed60216 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -199,18 +199,18 @@ Render.prototype.privateLine = function (recps, cb) {
Render.prototype.msgLink = function (msg, cb) {
var self = this
- var el = h('div')
+ var el = h('span')
+ var a = h('a', {href: self.toUrl(msg.key)}, msg.key)
self.app.unboxMsg(msg, function (err, msg) {
if (err) return el.appendChild(u.renderError(err)), cb()
- self.renderMsg(msg, false, function (err, msgEl) {
- if (err) msgEl = [
- h('a', {href: self.toUrl(msg.key)}, msg.key),
- u.renderError(err)]
- el.appendChild(h('table.ssb-msgs', msgEl))
+ var renderMsg = new RenderMsg(self, self.app, msg, {wrap: false})
+ renderMsg.title(function (err, title) {
+ if (err) return el.appendChild(u.renderError(err)), cb()
+ a.childNodes[0].textContent = title
cb()
})
})
- return el
+ return a
}
Render.prototype.renderMsg = function (msg, raw, cb) {
diff --git a/lib/serve.js b/lib/serve.js
index 188b275..8885704 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -685,7 +685,7 @@ Serve.prototype.wrapPage = function (title, searchQ) {
// h('a', {href: '/git'}, 'git')
)),
self.publishedMsg ? h('div',
- 'published:',
+ 'published ',
self.app.render.msgLink(self.publishedMsg, done())
) : '',
content