git ssb

16+

Dominic / patchbay



Commit 697e3e1780dfe42cdc94d4e26e2788489ddfb896

Render private messages in public views

cel committed on 11/29/2016, 4:26:26 PM
Parent: 931ac024cad9b0e63311dd1a76de77d0490f8391

Files changed

modules_basic/private.jschanged
style.csschanged
modules_basic/private.jsView
@@ -11,8 +11,9 @@
1111 var message_unbox = plugs.first(exports.message_unbox = [])
1212 var sbot_log = plugs.first(exports.sbot_log = [])
1313 var sbot_whoami = plugs.first(exports.sbot_whoami = [])
1414 var avatar_image_link = plugs.first(exports.avatar_image_link = [])
15 +var emoji_url = plugs.first(exports.emoji_url = [])
1516
1617 function unbox () {
1718 return pull(
1819 pull.filter(function (msg) {
@@ -90,7 +91,15 @@
9091 return avatar_image_link('string' == typeof id ? id : id.link, 'thumbnail')
9192 }))
9293 }
9394
95 +exports.message_content_mini = function (msg, sbot) {
96 + if (typeof msg.value.content === 'string') {
97 + var icon = emoji_url('lock')
98 + return icon
99 + ? h('img', {className: 'emoji', src: icon})
100 + : 'PRIVATE'
101 + }
102 +}
94103
95104
96105
style.cssView
@@ -263,9 +263,9 @@
263263
264264 .emoji {
265265 height: 1em;
266266 width: 1em;
267- vertical-align: middle;
267 + vertical-align: top;
268268 }
269269
270270
271271 /* -- suggest box */

Built with git-ssb-web