Commit b193cf1cb98f8047a8a2ae26315f1bc315bd9ead
Merge pull request #241 from christianbundy/remove-when-on-non-observables
Remove when() on non-observablesmix 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.js | changed |
message/html/compose.js | changed |
message/html/render/about.js | changed |
contact/html/relationships.js | ||
---|---|---|
@@ -61,9 +61,9 @@ | ||
61 | 61 … | const ImBlockingThem = computed(blockers, blockers => blockers.includes(myId)) |
62 | 62 … | |
63 | 63 … | return h('Relationships', [ |
64 | 64 … | h('header', 'Relationships'), |
65 | - when(id !== myId, | |
65 … | + id !== myId ? | |
66 | 66 … | h('div.your-status', [ |
67 | 67 … | h('header', 'Your status'), |
68 | 68 … | h('section -friendship', [ |
69 | 69 … | when(ImFollowing.sync, |
@@ -89,9 +89,9 @@ | ||
89 | 89 … | ]) |
90 | 90 … | ]) |
91 | 91 … | ]) |
92 | 92 … | ]) |
93 | - ), | |
93 … | + : undefined, | |
94 | 94 … | computed(blockers, blockers => { |
95 | 95 … | if (blockers.length === 0) return '' |
96 | 96 … | |
97 | 97 … | return h('div.blockers', [ |
message/html/compose.js | ||
---|---|---|
@@ -61,10 +61,10 @@ | ||
61 | 61 … | }, |
62 | 62 … | 'ev-focus': send(channelInputFocused.set, true), |
63 | 63 … | placeholder: '#channel (optional)', |
64 | 64 … | 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 | |
67 | 67 … | }) |
68 | 68 … | |
69 | 69 … | var draftPerstTimeout = null |
70 | 70 … | var draftLocation = location |
message/html/render/about.js | ||
---|---|---|
@@ -42,11 +42,11 @@ | ||
42 | 42 … | if (image && ref.isBlob(image.link)) image = image.link |
43 | 43 … | about = about || link |
44 | 44 … | |
45 | 45 … | 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 | |
49 | 49 … | ] |
50 | 50 … | |
51 | 51 … | if (!ref.isFeed(about)) { |
52 | 52 … | return [ |
Built with git-ssb-web