Commit 58b2705501fb1c4bc2438b15172f5ff6a3b56c3f
markdown descriptions
mix irving committed on 12/6/2017, 10:13:05 AMParent: b700e0ddf06112a4a31a142a308c150ed1ec1337
Files changed
app/page/settings.js | changed |
app/page/userShow.js | changed |
app/page/settings.js | ||
---|---|---|
@@ -1,6 +1,6 @@ | ||
1 | 1 | const nest = require('depnest') |
2 | -const { h } = require('mutant') | |
2 | +const { h, computed } = require('mutant') | |
3 | 3 | const electron = require('electron') |
4 | 4 | |
5 | 5 | exports.gives = nest('app.page.settings') |
6 | 6 | |
@@ -10,8 +10,9 @@ | ||
10 | 10 | 'about.obs.description': 'first', |
11 | 11 | 'history.sync.push': 'first', |
12 | 12 | 'history.obs.store': 'first', |
13 | 13 | 'keys.sync.id': 'first', |
14 | + 'message.html.markdown': 'first', | |
14 | 15 | 'settings.sync.get': 'first', |
15 | 16 | 'settings.sync.set': 'first', |
16 | 17 | 'settings.obs.get': 'first', |
17 | 18 | 'translations.sync.strings': 'first', |
@@ -69,9 +70,9 @@ | ||
69 | 70 | ]), |
70 | 71 | ]), |
71 | 72 | h('section -introduction', [ |
72 | 73 | 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 || ''))) | |
74 | 75 | ]), |
75 | 76 | h('section -language', [ |
76 | 77 | h('div.left', strings.settingsPage.section.language), |
77 | 78 | h('div.right', LANGUAGES.map(Language)) |
app/page/userShow.js | ||
---|---|---|
@@ -7,12 +7,14 @@ | ||
7 | 7 | |
8 | 8 | exports.needs = nest({ |
9 | 9 | 'about.html.avatar': 'first', |
10 | 10 | 'about.obs.name': 'first', |
11 | + 'about.obs.description': 'first', | |
11 | 12 | 'app.html.link': 'first', |
12 | 13 | 'app.html.blogCard': 'first', |
13 | 14 | 'contact.html.follow': 'first', |
14 | 15 | 'feed.pull.rollup': 'first', |
16 | + 'message.html.markdown': 'first', | |
15 | 17 | 'sbot.pull.userFeed': 'first', |
16 | 18 | 'keys.sync.id': 'first', |
17 | 19 | 'translations.sync.strings': 'first', |
18 | 20 | 'unread.sync.isUnread': 'first' |
@@ -26,8 +28,9 @@ | ||
26 | 28 | |
27 | 29 | const { feed } = location |
28 | 30 | const myId = api.keys.sync.id() |
29 | 31 | const name = api.about.obs.name(feed) |
32 | + const description = computed(api.about.obs.description(feed), d => api.message.html.markdown(d || '')) | |
30 | 33 | |
31 | 34 | const strings = api.translations.sync.strings() |
32 | 35 | |
33 | 36 | // const { followers } = api.contact.obs |
@@ -79,8 +82,9 @@ | ||
79 | 82 | feed === myId // Only expose own profile editing right now |
80 | 83 | ? userEditButton |
81 | 84 | : '' |
82 | 85 | ]), |
86 | + h('div.introduction', description), | |
83 | 87 | feed !== myId |
84 | 88 | ? h('div.actions', [ |
85 | 89 | api.contact.html.follow(feed), |
86 | 90 | h('div.directMessage', directMessageButton) |
Built with git-ssb-web