Commit d221f528353915ced2efa52aed3c925af62ddb9a
render fallback mini messages and private messages
Ev Bogue committed on 6/2/2018, 6:11:00 PMParent: 64e6ded7dfee57b2ef3292bb407995b003ba33cf
Files changed
render.js | changed |
render.js | ||
---|---|---|
@@ -96,11 +96,21 @@ | ||
96 | 96 | else if (msg.value.content.vote.value == -1) |
97 | 97 | 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) + '...')) |
98 | 98 | message.appendChild(tools.mini(msg, link)) |
99 | 99 | 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 | |
100 | 104 | } else { |
101 | - //message.appendChild(tools.header(msg)) | |
105 | + | |
106 | + //FULL FALLBACK | |
107 | + //message.appendChild(tools.header(msg)) | |
102 | 108 | //message.appendChild(h('pre', tools.rawJSON(msg.value.content))) |
103 | 109 | //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 | |
105 | 115 | } |
106 | 116 | } |
Built with git-ssb-web