Files: 84289a1e105783bad299705f084b4a07b225fa38 / message / html / timestamp.js
425 bytesRaw
1 | const h = require('mutant/h') |
2 | const nest = require('depnest') |
3 | |
4 | exports.gives = nest('message.html.timestamp') |
5 | exports.needs = nest('lib.obs.timeAgo', 'first') |
6 | |
7 | exports.create = function (api) { |
8 | return nest('message.html.timestamp', timestamp) |
9 | |
10 | function timestamp (msg) { |
11 | return h('a.Timestamp', { |
12 | href: msg.key, |
13 | title: new Date(msg.value.timestamp) |
14 | }, api.lib.obs.timeAgo(msg.value.timestamp)) |
15 | } |
16 | } |
17 | |
18 |
Built with git-ssb-web