Files: 38e0417253d2dc77736737889d97f936df7f35a0 / app / page / threadNew.js
640 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest('app.page.threadNew') |
5 | |
6 | exports.needs = nest({ |
7 | 'about.html.image': 'first', |
8 | 'about.obs.name': 'first', |
9 | 'app.html.nav': 'first', |
10 | 'app.html.thread': 'first', |
11 | }) |
12 | |
13 | exports.create = (api) => { |
14 | return nest('app.page.threadNew', threadNew) |
15 | |
16 | function threadNew (location) { |
17 | const { feed } = location |
18 | |
19 | return h('Page -threadNew', [ |
20 | h('h1', ['New thread with ', api.about.obs.name(feed)]), |
21 | api.about.html.image(feed), |
22 | api.app.html.nav(), |
23 | h('div', 'compose box') // a special one which takes us to threadShow |
24 | ]) |
25 | } |
26 | } |
27 |
Built with git-ssb-web