git ssb

1+

punkmonk.termux / mvd



forked from ev / mvd

Commit d221f528353915ced2efa52aed3c925af62ddb9a

render fallback mini messages and private messages

Ev Bogue committed on 6/2/2018, 6:11:00 PM
Parent: 64e6ded7dfee57b2ef3292bb407995b003ba33cf

Files changed

render.jschanged
render.jsView
@@ -96,11 +96,21 @@
9696 else if (msg.value.content.vote.value == -1)
9797 var link = h('span', ' ', h('img.emoji', {src: config.emojiUrl + 'stars.png'}), ' ', h('a', {href: '#' + msg.value.content.vote.link}, msg.value.content.vote.link.substring(0,16) + '...'))
9898 message.appendChild(tools.mini(msg, link))
9999 return message
100+ } else if (typeof msg.value.content === 'string') {
101+ var privateMsg = h('span', ' ', h('img.emoji', {src: config.emojiUrl + 'lock.png'}))
102+ message.appendChild(tools.mini(msg, privateMsg))
103+ return message
100104 } else {
101- //message.appendChild(tools.header(msg))
105+
106+ //FULL FALLBACK
107+ //message.appendChild(tools.header(msg))
102108 //message.appendChild(h('pre', tools.rawJSON(msg.value.content)))
103109 //return message
104- return h('div.invisibleMessage')
110+
111+ //MINI FALLBACK
112+ var fallback = h('span', ' ' + msg.value.content.type)
113+ message.appendChild(tools.mini(msg, fallback))
114+ return message
105115 }
106116 }

Built with git-ssb-web