Files: 00b7dc676f3599b4be16806c7ce93abbd9c724c5 / modules / main.js
708 bytesRaw
1 | var h = require('hyperscript') |
2 | var ui = require('../ui') |
3 | var u = require('../util') |
4 | var pull = require('pull-stream') |
5 | var Scroller = require('pull-scroll') |
6 | |
7 | exports.screen_view = function (path, sbot) { |
8 | if(path === '/') { |
9 | |
10 | var content = h('div.column') |
11 | var div = h('div.column', {style: {'overflow':'auto'}}, |
12 | u.decorate(exports.message_compose, {}, function (d, e, v) { |
13 | return d(e, v, sbot) |
14 | }), |
15 | content |
16 | ) |
17 | var render = ui.createRenderers(exports.message_render, sbot) |
18 | |
19 | pull( |
20 | sbot.createLogStream({reverse: true}), |
21 | Scroller(div, content, render, false, false) |
22 | ) |
23 | |
24 | return div |
25 | } |
26 | } |
27 | |
28 | exports.message_render = [] |
29 | exports.message_compose = [] |
30 | |
31 | |
32 | |
33 | |
34 |
Built with git-ssb-web