Commit f673ec400fd6aac5f54664a90b9d9fc631bab957
don't include full blob url in gathering image link
stops external link hoverMatt McKegg committed on 10/18/2017, 5:24:45 AM
Parent: e39458cf79ac14e9ae06c78494db0453c35f8f9b
Files changed
plugs/message/html/render/gathering.js | changed |
plugs/message/html/render/gathering.js | ||
---|---|---|
@@ -39,8 +39,9 @@ | ||
39 | 39 | following = api.contact.obs.following(yourId) |
40 | 40 | } |
41 | 41 | |
42 | 42 | var imageUrl = computed(image, (id) => api.blob.sync.url(id)) |
43 | + var imageId = computed(image, (link) => link && link.link || link) | |
43 | 44 | var content = h('GatheringCard', [ |
44 | 45 | h('div.title', [ |
45 | 46 | h('a', {href: msg.key}, title), |
46 | 47 | h('button', { |
@@ -48,9 +49,9 @@ | ||
48 | 49 | }, 'Edit Details') |
49 | 50 | ]), |
50 | 51 | h('div.time', computed(startDateTime, formatTime)), |
51 | 52 | when(image, h('a.image', { |
52 | - href: imageUrl, | |
53 | + href: imageId, | |
53 | 54 | style: { |
54 | 55 | 'background-image': computed(imageUrl, (url) => `url(${url})`) |
55 | 56 | } |
56 | 57 | })), |
Built with git-ssb-web