git ssb

2+

mixmix / ticktack



Tree: b562e05b785dd3f68360267ec1b32b9c9e775278

Files: b562e05b785dd3f68360267ec1b32b9c9e775278 / app / page / userShow.js

1009 bytesRaw
1const nest = require('depnest')
2const { h } = require('mutant')
3
4exports.gives = nest('app.page.userShow')
5
6exports.needs = nest({
7 'translations.sync.strings': 'first',
8 'app.html.link': 'first',
9 'app.html.nav': 'first',
10 'about.html.image': 'first',
11 'about.obs.name': 'first',
12 'keys.sync.id': 'first',
13})
14
15exports.create = (api) => {
16 var strings = api.translations.sync.strings()
17
18 return nest('app.page.userShow', userShow)
19
20 function userShow (location) {
21
22 const { feed } = location
23 const Link = api.app.html.link
24 const myId = api.keys.sync.id()
25 var name = api.about.html.name(feed)
26
27 return h('Page -userShow', {title: api.about.obs.name(feed)}, [
28 api.about.html.image(feed),
29 h('div', strings.followButton),
30 h('div', strings.friendsInCommon),
31 feed !== myId
32 ? Link({ page: 'threadNew', feed }, strings.newThread)
33 : '',
34 h('div', strings.userConvesationsWith, name),
35 h('div', name, strings.userIsInGroups),
36 ])
37 }
38}
39
40
41
42

Built with git-ssb-web