Commit 51e9066a0702c78e11bebb57dd35daea32b5523b
Merge pull request #152 from dangerousbeans/show_blocking
display who a profile is blocking, as well as who they are blocked byAnders 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.js | changed |
contact/html/relationships.js | ||
---|---|---|
@@ -12,8 +12,9 @@ | ||
12 | 12 … | 'contact.async.unblock': 'first', |
13 | 13 … | 'contact.obs.followers': 'first', |
14 | 14 … | 'contact.obs.following': 'first', |
15 | 15 … | 'contact.obs.blockers': 'first', |
16 … | + 'contact.obs.blocking': 'first', | |
16 | 17 … | 'keys.sync.id': 'first' |
17 | 18 … | }) |
18 | 19 … | |
19 | 20 … | exports.create = function (api) { |
@@ -55,8 +56,9 @@ | ||
55 | 56 … | } |
56 | 57 … | |
57 | 58 … | const { unfollow, follow, block, unblock } = api.contact.async |
58 | 59 … | const blockers = api.contact.obs.blockers(id) |
60 … | + const blocking = api.contact.obs.blocking(id) | |
59 | 61 … | const ImBlockingThem = computed(blockers, blockers => blockers.includes(myId)) |
60 | 62 … | |
61 | 63 … | return h('Relationships', [ |
62 | 64 … | h('header', 'Relationships'), |
@@ -88,8 +90,16 @@ | ||
88 | 90 … | ]) |
89 | 91 … | ]) |
90 | 92 … | ]) |
91 | 93 … | ), |
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 … | + }), | |
92 | 102 … | computed(blockers, blockers => { |
93 | 103 … | if (blockers.length === 0) return '' |
94 | 104 … | |
95 | 105 … | return h('div.blockers', [ |
Built with git-ssb-web