git ssb

16+

Dominic / patchbay



Commit 96337c62e3ddfa9c60cef474a2d2f980e1239221

tweak to accomidate patch-gatherings

mix irving committed on 5/1/2017, 6:52:32 AM
Parent: fa2f027218aa9786af67ffb14c515c69fed1002e

Files changed

message/html/render/about.jschanged
message/html/render/about.jsView
@@ -19,8 +19,11 @@
1919
2020 function about (msg, opts) {
2121 if (msg.value.content.type !== 'about') return
2222
23 + const { name, description, image } = msg.value.content
24 + if (!name && !description && !image) return
25 +
2326 const element = api.message.html.layout(msg, extend({
2427 content: renderContent(msg),
2528 layout: 'default'
2629 }, opts))
@@ -35,14 +38,20 @@
3538 // TODO : build better normalizers
3639 if (image && ref.isBlob(image.link)) image = image.link
3740 about = about || link
3841
42 + const metaData = [
43 + when(name, h('div', [ h('strong', 'Name: '), name ])),
44 + when(description, h('div', [ h('strong', 'Description: '), description ])),
45 + when(image, h('img', { src: api.blob.sync.url(image) }))
46 + ]
47 +
3948 if (!ref.isFeed(about)) {
4049 return [
4150 'Describes ',
4251 h('a', { href: about }, [about.slice(0, 7), '...']),
4352 ' as: ',
44- name
53 + ...metaData
4554 ]
4655 }
4756
4857 const target = author === about
@@ -50,11 +59,9 @@
5059 : api.about.html.link(about)
5160
5261 return [
5362 'Declares the following about ', target,
54- when(name, h('div', [ h('strong', 'Name: '), name ])),
55- when(description, h('div', [ h('strong', 'Description: '), description ])),
56- when(image, h('img', { src: api.blob.sync.url(image) }))
63 + ...metaData
5764 ]
5865 }
5966 }
6067

Built with git-ssb-web