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