Files: a732bc2a78bd9ce1b2bff429591d2b85f9a86306 / 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