git ssb

9+

cel / ssb-viewer



Commit 42c466b4df95b6087c9bd667c507c630a7d88843

Let timestamps link directly to the message, makes it easier to see a thread from channel or user-feed

Anders Rune Jensen committed on 5/31/2017, 7:20:43 PM
Parent: f5e2111be8db7544d34c2400b3b8b02a24ed91e8

Files changed

render.jschanged
render.jsView
@@ -330,24 +330,24 @@
330330 ' href="' + opts.base +
331331 escape(msg.value.author) +
332332 '"' +
333333 ">" + msg.author.name + "</a>" +
334- msgTimestamp(msg, name) +
334 + msgTimestamp(msg, opts.base + name) +
335335 '</figcaption>' +
336336 '</figure>' +
337337 '</header>' +
338338 render(opts, c) +
339339 "</article>"
340340 );
341341 }
342342
343-function msgTimestamp(msg, name) {
343 +function msgTimestamp(msg, link) {
344344 var date = new Date(msg.value.timestamp);
345345 var isoStr = date.toISOString();
346346 return (
347347 '<time class="ssb-timestamp" datetime="' + isoStr + '">' +
348348 '<a ' +
349- 'href="#' + name + '" ' +
349 + 'href="' + link + '" ' +
350350 'title="' + isoStr + '" ' +
351351 '>' + formatDate(date) + '</a>' +
352352 '</time>'
353353 );

Built with git-ssb-web