plugs/message/html/render/about.jsView |
---|
24 | 24 … | if (!ref.isFeed(msg.value.content.about)) return |
25 | 25 … | |
26 | 26 … | var c = msg.value.content |
27 | 27 … | var self = msg.value.author === c.about |
| 28 … | + |
| 29 … | + var miniContent = [] |
28 | 30 … | var content = [] |
29 | 31 … | |
30 | 32 … | if (c.name) { |
31 | 33 … | var target = api.profile.html.person(c.about, c.name) |
32 | | - content.push(computed([self, api.about.obs.name(c.about), c.name], (self, a, b) => { |
| 34 … | + miniContent.push(computed([self, api.about.obs.name(c.about), c.name], (self, a, b) => { |
33 | 35 … | if (self) { |
34 | 36 … | return ['self identifies as "', target, '"'] |
35 | 37 … | } else if (a === b) { |
36 | 38 … | return ['identified ', api.profile.html.person(c.about)] |
40 | 42 … | })) |
41 | 43 … | } |
42 | 44 … | |
43 | 45 … | if (c.image) { |
44 | | - if (!content.length) { |
| 46 … | + if (!miniContent.length) { |
|
45 | 47 … | var imageAction = self ? 'self assigned a display image' : ['assigned a display image to ', api.profile.html.person(c.about)] |
46 | | - content.push(imageAction) |
| 48 … | + miniContent.push(imageAction) |
47 | 49 … | } |
48 | 50 … | |
49 | 51 … | content.push(h('a AboutImage', { |
50 | 52 … | href: c.about |
54 | 56 … | } |
55 | 57 … | |
56 | 58 … | var elements = [] |
57 | 59 … | |
58 | | - if (content.length) { |
| 60 … | + if (miniContent.length) { |
59 | 61 … | var element = api.message.html.layout(msg, extend({ |
60 | 62 … | showActions: true, |
| 63 … | + miniContent, |
61 | 64 … | content, |
62 | 65 … | layout: 'mini' |
63 | 66 … | }, opts)) |
64 | 67 … | elements.push(api.message.html.decorate(element, { msg })) |
66 | 69 … | |
67 | 70 … | if (c.description) { |
68 | 71 … | elements.push(api.message.html.decorate(api.message.html.layout(msg, extend({ |
69 | 72 … | showActions: true, |
70 | | - content: [ |
71 | | - self ? 'self assigned a description' : ['assigned a description to ', api.profile.html.person(c.about)], |
72 | | - api.message.html.markdown(c.description) |
73 | | - ], |
| 73 … | + miniContent: self ? 'self assigned a description' : ['assigned a description to ', api.profile.html.person(c.about)], |
| 74 … | + content: api.message.html.markdown(c.description), |
74 | 75 … | layout: 'mini' |
75 | 76 … | }, opts)), { msg })) |
76 | 77 … | } |
77 | 78 … | |