diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-03-10 17:15:55 -0500 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-03-10 17:15:55 -0500 |
commit | 02cc78da9251b2ffd896dbf06bbb48e36160edbc (patch) | |
tree | 41bad4a0f6b5e52a4d3586bebb3d52233c8dafa7 /lib | |
parent | 66a1c44a08391be6697a378db3c0b953d2fb766d (diff) | |
download | patchfoo-02cc78da9251b2ffd896dbf06bbb48e36160edbc.tar.gz patchfoo-02cc78da9251b2ffd896dbf06bbb48e36160edbc.zip |
on publish, show only name of new message
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render.js | 14 | ||||
-rw-r--r-- | lib/serve.js | 2 |
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 |