git ssb

3+

ev / sdash



Commit 2812e21b2be7dcab1cc07911be4a52548041bd9a

add avatar names to everything

Ev Bogue committed on 9/15/2016, 11:18:00 PM
Parent: 673f1c3e0d3f41220ad06d849135a029dd6aa8cc

Files changed

index.jschanged
index.jsView
@@ -12,8 +12,28 @@
1212 var me = '@8Qee0I/DwI5DHSCi3p5fsl6FyLGArrnDz3ox9qZr5Qc=.ed25519'
1313 var desc = 'This is <a href="https://gitmx.com/%25qrU04j9vfUJKfq1rGZrQ5ihtSfA4ilfY3wLy7xFv0xk%3D.sha256">sdash</a>, a work-in-progress personal gateway to the <a href="http://ssbc.github.io">scuttlebot</a> distributed social network'
1414 var bloburl = 'http://localhost:8989/blobs/get/'
1515
16 +client(function (err, sbot) {
17 + pull(
18 + sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'email'}}}}], limit: 1, reverse: true}),
19 + pull.drain(function (data) {
20 + email = data.value.content.email;
21 + })
22 + )
23 + pull(
24 + sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'location'}}}}], limit: 1, reverse: true}),
25 + pull.drain(function (data) {
26 + loc = data.value.content.location;
27 + })
28 + )
29 + pull(
30 + sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'website'}}}}], limit: 1, reverse: true}),
31 + pull.drain(function (data) {
32 + website = data.value.content.website;
33 + })
34 + )
35 +})
1636
1737 http.createServer(function (req, res){
1838 if (req.url === '/') {
1939 client(function (err, sbot) {
@@ -88,31 +108,38 @@
88108 h('img.profile', {src: bloburl + image}),
89109 h('h1',
90110 h('a', {href: me }, '@' + name)
91111 ),
112 + h('p', loc + ' ',
113 + h('a', {href: 'mailto:' + email}, email)
114 + ),
92115 h('p', {innerHTML: desc}),
93116 h('hr'),
94117 h('div.msg',
95118 h('p.small.ri', 'pinned'),
96119 h('img.avatar', {src: bloburl + image}),
120 + h('a', {href: me }, '@' + name),
97121 h('div', {innerHTML: md.block(pinned.value.content.text)},
98122 h('span.date', mo(pinned.value.timestamp).fromNow())
99123 )
100124 ),
101125 h('div.msg',
102126 h('p.small.ri', 'post'),
103127 h('img.avatar', {src: bloburl + image}),
128 + h('a', {href: me }, '@' + name),
104129 h('div', {innerHTML: md.block(post.value.content.text)},
105130 h('span.date', mo(post.value.timestamp).fromNow())
106131 )
107132 ),
108133 h('div.msg',
109134 h('p.small.ri', 'dig'),
110135 h('img.avatar', {src: bloburl + image}),
136 + h('a', {href: me }, '@' + name), ' dug ',
111137 h('div', vote.value.content.vote.link,
112138 h('p.date', mo(vote.value.timestamp).fromNow()),
113139 h('div.msg',
114140 h('img.avatar', {src: bloburl + reauthor.image}),
141 + h('a', {href: reauthor.name }, '@' + name),
115142 h('div', {innerHTML: md.block(redo.value.content.text)},
116143 h('span.date', mo(redo.value.timestamp).fromNow())
117144 )
118145 )
@@ -120,8 +147,9 @@
120147 ),
121148 h('div.msg',
122149 h('p.small.ri', 'last mention'),
123150 h('img.avatar', {src: bloburl + mentionauthor.image}),
151 + h('a', {href: me }, '@' + mentionauthor.name),
124152 h('div', {innerHTML: md.block(mention.value.content.text)},
125153 h('span.date', mo(mention.value.timestamp).fromNow())
126154 )
127155 )

Built with git-ssb-web