Files: 2f3728d62f4995c91fc3de4f0ca6b5a08ceccfb7 / app / page / threadNew.js
708 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 | 'translations.sync.strings': 'first', |
8 | 'about.html.image': 'first', |
9 | 'about.obs.name': 'first', |
10 | 'app.html.thread': 'first', |
11 | }) |
12 | |
13 | exports.create = (api) => { |
14 | var strings = api.translations.sync.strings() |
15 | |
16 | return nest('app.page.threadNew', threadNew) |
17 | |
18 | function threadNew (location) { |
19 | const { feed } = location |
20 | |
21 | return h('Page -threadNew', {title: strings.threadNew}, [ |
22 | h('h1', ['New thread with ', api.about.obs.name(feed)]), |
23 | api.about.html.image(feed), |
24 | h('div', 'compose box') // a special one which takes us to threadShow |
25 | ]) |
26 | } |
27 | } |
28 | |
29 | |
30 | |
31 | |
32 |
Built with git-ssb-web