git ssb

2+

mixmix / ticktack



Commit 58b2705501fb1c4bc2438b15172f5ff6a3b56c3f

markdown descriptions

mix irving committed on 12/6/2017, 10:13:05 AM
Parent: b700e0ddf06112a4a31a142a308c150ed1ec1337

Files changed

app/page/settings.jschanged
app/page/userShow.jschanged
app/page/settings.jsView
@@ -1,6 +1,6 @@
11 const nest = require('depnest')
2-const { h } = require('mutant')
2+const { h, computed } = require('mutant')
33 const electron = require('electron')
44
55 exports.gives = nest('app.page.settings')
66
@@ -10,8 +10,9 @@
1010 'about.obs.description': 'first',
1111 'history.sync.push': 'first',
1212 'history.obs.store': 'first',
1313 'keys.sync.id': 'first',
14+ 'message.html.markdown': 'first',
1415 'settings.sync.get': 'first',
1516 'settings.sync.set': 'first',
1617 'settings.obs.get': 'first',
1718 'translations.sync.strings': 'first',
@@ -69,9 +70,9 @@
6970 ]),
7071 ]),
7172 h('section -introduction', [
7273 h('div.left', strings.settingsPage.section.introduction),
73- h('div.right', api.about.obs.description(feed)),
74+ h('div.right', computed(api.about.obs.description(feed), d => api.message.html.markdown(d || '')))
7475 ]),
7576 h('section -language', [
7677 h('div.left', strings.settingsPage.section.language),
7778 h('div.right', LANGUAGES.map(Language))
app/page/userShow.jsView
@@ -7,12 +7,14 @@
77
88 exports.needs = nest({
99 'about.html.avatar': 'first',
1010 'about.obs.name': 'first',
11+ 'about.obs.description': 'first',
1112 'app.html.link': 'first',
1213 'app.html.blogCard': 'first',
1314 'contact.html.follow': 'first',
1415 'feed.pull.rollup': 'first',
16+ 'message.html.markdown': 'first',
1517 'sbot.pull.userFeed': 'first',
1618 'keys.sync.id': 'first',
1719 'translations.sync.strings': 'first',
1820 'unread.sync.isUnread': 'first'
@@ -26,8 +28,9 @@
2628
2729 const { feed } = location
2830 const myId = api.keys.sync.id()
2931 const name = api.about.obs.name(feed)
32+ const description = computed(api.about.obs.description(feed), d => api.message.html.markdown(d || ''))
3033
3134 const strings = api.translations.sync.strings()
3235
3336 // const { followers } = api.contact.obs
@@ -79,8 +82,9 @@
7982 feed === myId // Only expose own profile editing right now
8083 ? userEditButton
8184 : ''
8285 ]),
86+ h('div.introduction', description),
8387 feed !== myId
8488 ? h('div.actions', [
8589 api.contact.html.follow(feed),
8690 h('div.directMessage', directMessageButton)

Built with git-ssb-web