git ssb

16+

Dominic / patchbay



Commit 51e9066a0702c78e11bebb57dd35daea32b5523b

Merge pull request #152 from dangerousbeans/show_blocking

display who a profile is blocking, as well as who they are blocked by
Anders Rune Jensen authored on 11/17/2017, 8:08:41 PM
GitHub committed on 11/17/2017, 8:08:41 PM
Parent: dfab72629c4a2041faa87cedfbb83f92d52a8cd7
Parent: a1cc908405943c59caa0f25427931456791123b8

Files changed

contact/html/relationships.jschanged
contact/html/relationships.jsView
@@ -12,8 +12,9 @@
1212 'contact.async.unblock': 'first',
1313 'contact.obs.followers': 'first',
1414 'contact.obs.following': 'first',
1515 'contact.obs.blockers': 'first',
16 + 'contact.obs.blocking': 'first',
1617 'keys.sync.id': 'first'
1718 })
1819
1920 exports.create = function (api) {
@@ -55,8 +56,9 @@
5556 }
5657
5758 const { unfollow, follow, block, unblock } = api.contact.async
5859 const blockers = api.contact.obs.blockers(id)
60 + const blocking = api.contact.obs.blocking(id)
5961 const ImBlockingThem = computed(blockers, blockers => blockers.includes(myId))
6062
6163 return h('Relationships', [
6264 h('header', 'Relationships'),
@@ -88,8 +90,16 @@
8890 ])
8991 ])
9092 ])
9193 ),
94 + computed(blocking, blocking => {
95 + if (blocking.length === 0) return ''
96 +
97 + return h('div.blocking', [
98 + h('header', 'Blocking'),
99 + h('section', blocking.map(imageLink))
100 + ])
101 + }),
92102 computed(blockers, blockers => {
93103 if (blockers.length === 0) return ''
94104
95105 return h('div.blockers', [

Built with git-ssb-web