git ssb

1+

Daan Patchwork / patchwork



Commit 99ea145bb810c17eeebbdc499b193be50db160f0

[WIP] display blocking reasons

Daan Wynen committed on 1/15/2021, 12:55:06 AM
Parent: 57ccce81ba723d27f52cdc30a621ec0e5af16c7d

Files changed

lib/depject/message/html/render/following.jschanged
lib/depject/message/html/render/following.jsView
@@ -1,4 +1,5 @@
1 +const { h } = require('mutant')
12 const nest = require('depnest')
23 const extend = require('xtend')
34 const ref = require('ssb-ref')
45
@@ -6,8 +7,9 @@
67 'message.html': {
78 decorate: 'reduce',
89 layout: 'first'
910 },
11 + 'message.html.markdown': 'first',
1012 'profile.html.person': 'first',
1113 'intl.sync.i18n': 'first'
1214 })
1315
@@ -36,13 +38,18 @@
3638
3739 function messageContent (msg) {
3840 const following = msg.value.content.following
3941 const blocking = msg.value.content.blocking
42 + const reason = msg.value.content.reason
4043
4144 if (blocking === true) {
42- return [
45 + const text = [
4346 i18n('blocked '), api.profile.html.person(msg.value.content.contact)
4447 ]
48 + if (reason) {
49 + text.push(h('section.content', h('Message', api.message.html.markdown(reason))))
50 + }
51 + return text
4552 } else if (typeof following === 'boolean') {
4653 return [
4754 following ? i18n('followed ') : i18n('unfollowed '),
4855 api.profile.html.person(msg.value.content.contact)

Built with git-ssb-web