git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit b2f193dcfd24e9aae4e6ce5010c909b026e2e662

add list of recps to private message display

Matt McKegg committed on 2/17/2017, 2:17:27 AM
Parent: 26bf432efc0fbd7b451314cf7b90b88a3302008c

Files changed

plugs/message/html/meta/private.jsadded
styles/avatar.mcsschanged
plugs/message/html/meta/private.jsView
@@ -1,0 +1,26 @@
1+const h = require('mutant/h')
2+const map = require('mutant/map')
3+const nest = require('depnest')
4+var msgs = require('ssb-msgs')
5+
6+exports.needs = nest({
7+ 'about.html.image': 'first',
8+ 'about.obs.name': 'first'
9+})
10+exports.gives = nest('message.html.meta')
11+
12+exports.create = (api) => {
13+ return nest('message.html.meta', function privateMeta (msg) {
14+ if (msg.value.private) {
15+ return h('span.private', map(msg.value.content.recps, id => {
16+ id = msgs.link(id, 'feed').link
17+ return h('a', {
18+ href: id,
19+ title: api.about.obs.name(id)
20+ }, [
21+ api.about.html.image(id)
22+ ])
23+ }))
24+ }
25+ })
26+}
styles/avatar.mcssView
@@ -1,3 +1,4 @@
11 Avatar {
22 background-image: linear-gradient(172deg, rgb(247, 247, 247), rgba(0,0,0,0))
3+ width: 45px
34 }

Built with git-ssb-web