git ssb

16+

Dominic / patchbay



Commit b193cf1cb98f8047a8a2ae26315f1bc315bd9ead

Merge pull request #241 from christianbundy/remove-when-on-non-observables

Remove when() on non-observables
mix irving authored on 8/21/2018, 11:30:47 PM
GitHub committed on 8/21/2018, 11:30:47 PM
Parent: 6dbc799416e7828344ed4ab645ebde51f3ddaea0
Parent: e0d1f2605dbd0f6b655b690d173b21a6de2d11f1

Files changed

contact/html/relationships.jschanged
message/html/compose.jschanged
message/html/render/about.jschanged
contact/html/relationships.jsView
@@ -61,9 +61,9 @@
6161 const ImBlockingThem = computed(blockers, blockers => blockers.includes(myId))
6262
6363 return h('Relationships', [
6464 h('header', 'Relationships'),
65- when(id !== myId,
65 + id !== myId ?
6666 h('div.your-status', [
6767 h('header', 'Your status'),
6868 h('section -friendship', [
6969 when(ImFollowing.sync,
@@ -89,9 +89,9 @@
8989 ])
9090 ])
9191 ])
9292 ])
93- ),
93 + : undefined,
9494 computed(blockers, blockers => {
9595 if (blockers.length === 0) return ''
9696
9797 return h('div.blockers', [
message/html/compose.jsView
@@ -61,10 +61,10 @@
6161 },
6262 'ev-focus': send(channelInputFocused.set, true),
6363 placeholder: '#channel (optional)',
6464 value: computed(meta.channel, ch => ch ? '#' + ch : null),
65- disabled: when(meta.channel, true),
66- title: when(meta.channel, 'Reply is in same channel as original message')
65 + disabled: meta.channel ? true : undefined,
66 + title: meta.channel ? 'Reply is in same channel as original message' : undefined
6767 })
6868
6969 var draftPerstTimeout = null
7070 var draftLocation = location
message/html/render/about.jsView
@@ -42,11 +42,11 @@
4242 if (image && ref.isBlob(image.link)) image = image.link
4343 about = about || link
4444
4545 const metaData = [
46- when(name, h('div', [ h('strong', 'Name: '), name ])),
47- when(description, h('div', [ h('strong', 'Description: '), description ])),
48- when(image, h('img', { src: api.blob.sync.url(image), style: { 'margin-top': '.5rem' } }))
46 + name ? h('div', [ h('strong', 'Name: '), name ]) : undefined,
47 + description ? h('div', [ h('strong', 'Description: '), description ]) : undefined,
48 + image ? h('img', { src: api.blob.sync.url(image), style: { 'margin-top': '.5rem' } }): undefined
4949 ]
5050
5151 if (!ref.isFeed(about)) {
5252 return [

Built with git-ssb-web