git ssb

1+

punkmonk.termux / mvd



forked from ev / mvd

Commit d6c90ba12886129623834c81dfcd6e02e6ec8d5d

render about messages

Ev Bogue committed on 2/14/2019, 1:44:36 AM
Parent: 1d62af50d0e39034f4d142cc41f0e948dfa0274b

Files changed

render.jschanged
render.jsView
@@ -33,8 +33,30 @@
3333 message.appendChild(tools.mini(msg, muted))
3434 return message
3535 }
3636
37+ else if (msg.value.content.type == 'about') {
38+ if (msg.value.content.image) {
39+ var image = h('span.avatar--small',
40+ ' identified ',
41+ h('a', {href: '#' + msg.value.content.about}, avatar.cachedName(msg.value.content.about)),
42+ ' as ',
43+ h('img', {src: config.blobsUrl + msg.value.content.image.link})
44+ )
45+ message.appendChild(tools.mini(msg, image))
46+ }
47+ if (msg.value.content.name) {
48+ var name = h('span',
49+ ' identified ',
50+ h('a', {href: '#' + msg.value.content.about}, avatar.cachedName(msg.value.content.about)),
51+ ' as ', msg.value.content.name
52+ )
53+ message.appendChild(tools.mini(msg, name))
54+ }
55+
56+ return message
57+ }
58+
3759 else if (msg.value.content.type == 'label'){
3860 var content = h('span', ' labeled ', tools.messageLink(msg.value.content.link), ' as ', h('mark', h('a', {href: '/#label/' + msg.value.content.label}, msg.value.content.label)))
3961 message.appendChild(tools.mini(msg, content))
4062 return message

Built with git-ssb-web