git ssb

16+

Dominic / patchbay



Commit 351dcdf50a59c747ae9da7707e703618d9ce6955

show blockers, styling, misc

mix irving committed on 9/15/2017, 10:53:33 AM
Parent: 1ba824812b72f7bc3dc8f10868e60771aa10e481

Files changed

contact/html/relationships.jschanged
contact/html/relationships.mcsschanged
package-lock.jsonchanged
package.jsonchanged
contact/html/relationships.jsView
@@ -11,9 +11,9 @@
1111 'contact.async.block': 'first',
1212 'contact.async.unblock': 'first',
1313 'contact.obs.followers': 'first',
1414 'contact.obs.following': 'first',
15- // 'contact.obs.blockers': 'first',
15 + 'contact.obs.blockers': 'first',
1616 'keys.sync.id': 'first'
1717 })
1818
1919 exports.create = function (api) {
@@ -54,10 +54,10 @@
5454 )
5555 }
5656
5757 const { unfollow, follow, block, unblock } = api.contact.async
58- // const blockedBy = api.contact.obs.blockers(id)
59- // const ImBlockingThem = computed(blockedBy, blockers => blockers.has(myId))
58 + const blockers = api.contact.obs.blockers(id)
59 + const ImBlockingThem = computed(blockers, blockers => blockers.includes(myId))
6060
6161 return h('Relationships', [
6262 h('header', 'Relationships'),
6363 when(id !== myId,
@@ -73,19 +73,31 @@
7373 ),
7474 when(ImFollowing.sync, h('div.relationship-status', relationshipStatus)),
7575 ]),
7676 h('section -blocking', [
77- // when(ImBlockingThem,
78- // h('button', { 'ev-click': () => unblock(id, console.log) }, 'unblock'),
79- // h('button', { 'ev-click': () => block(id, console.log) }, 'BLOCK')
80- // ),
77 + when(ImBlockingThem,
78 + h('button', { 'ev-click': () => unblock(id, console.log) }, 'unblock'),
79 + h('button', { 'ev-click': () => block(id, console.log) }, 'BLOCK')
80 + ),
8181 h('div.explainer', [
82- "Blocking is a way to tell others that you don't want to communicate with a person ",
83- "(you don't want to hear from them, and you don't want them to hear about you)."
82 + "Blocking tells everyone you don't want to communicate with a person.",
83 + h('ul', [
84 + h('li', 'You will no longer receive messages from this person'),
85 + h('li', "This person won't get any new information about you (including this block)"),
86 + h('li', "Your followers will see you have blocked this person - their apps need to know so that they don't pass your information on."),
87 + ])
8488 ])
8589 ])
8690 ])
8791 ),
92 + computed(blockers, blockers => {
93 + if (blockers.length === 0) return ''
94 +
95 + return h('div.blockers', [
96 + h('header', 'Blocked by'),
97 + h('section', blockers.map(imageLink))
98 + ])
99 + }),
88100 h('div.friends', [
89101 h('header', 'Friends'),
90102 h('section', map(friends, imageLink))
91103 ]),
contact/html/relationships.mcssView
@@ -49,8 +49,33 @@
4949
5050 }
5151 -blocking {
5252 margin-left: 8rem
53 + position: relative
54 +
55 + button {}
56 +
57 + div.explainer {
58 + visibility: hidden
59 + position: absolute
60 + background: #fff
61 + width: 24rem
62 + left: 1rem
63 + bottom: 2rem
64 + padding: .5rem
65 + box-shadow: rgba(0, 0, 0, 0.2) 2px 2px 8px
66 +
67 + ul {
68 + font-size: .8rem
69 + padding-left: 1rem
70 + }
71 + }
72 +
73 + :hover {
74 + div.explainer {
75 + visibility: visible
76 + }
77 + }
5378 }
5479 }
5580
5681 }
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 305060 bytes
New file size: 305122 bytes
package.jsonView
@@ -85,9 +85,9 @@
8585 "electron": "~1.6.11",
8686 "ssb-about": "^0.1.0",
8787 "ssb-backlinks": "^0.4.0",
8888 "ssb-blobs": "^1.1.3",
89- "ssb-friends": "^2.2.2",
89 + "ssb-friends": "^2.2.3",
9090 "ssb-fulltext": "^1.0.1",
9191 "ssb-keys": "^7.0.10",
9292 "ssb-mentions": "^0.4.0",
9393 "ssb-private": "^0.1.2",

Built with git-ssb-web