Commit 9f08a6bb50ebb3803a2d0744e645afde23e5bbbd
disable extra for now
Dominic Tarr committed on 7/10/2019, 12:45:05 PMParent: 3a07109294dddc38f2e689c7baca4fbf2c9a4d00
Files changed
message-layout.js | added |
message-layout.js | ||
---|---|---|
@@ -1,0 +1,28 @@ | ||
1 … | +var u = require('yap-util') | |
2 … | +var ref = require('ssb-ref') | |
3 … | +var niceAgo = require('nice-ago') | |
4 … | +var toUrl = u.toUrl | |
5 … | + | |
6 … | +module.exports = function (opts, apply) { | |
7 … | + return ['div.Message', | |
8 … | + apply.cacheAttrs(toUrl('message', {id: opts.key}), opts.key, apply.since), | |
9 … | + ['div.MessageSide', | |
10 … | + apply('avatar', {id: opts.author, name: false, image: true}), | |
11 … | + ['a', { | |
12 … | + href: toUrl('message', {id: opts.key}), | |
13 … | + title: new Date(opts.ts)+'\n'+opts.key | |
14 … | + }, | |
15 … | + ''+niceAgo(Date.now(), opts.ts) | |
16 … | + ] | |
17 … | + ], | |
18 … | + ['div.MessageMain', | |
19 … | + ['div.MessageMeta', | |
20 … | + apply('avatar', {id: opts.author, name: true, image: false}), | |
21 … | + ['label.msgId', opts.id], | |
22 … | + opts.meta ? opts.meta : '' | |
23 … | + ], | |
24 … | + ['div.MessageContent', opts.content], | |
25 … | +// opts.extra && ['div.MessageExtra', apply('messageExtra', opts.key)] | |
26 … | + ] | |
27 … | + ] | |
28 … | +} |
Built with git-ssb-web