Files: 682c62ee009cae46f4f5328ce86d4c2b938b2eb2 / modules / main.js
813 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 | var content = h('div.column') |
10 | var div = h('div.column', {style: {'overflow':'auto'}}, |
11 | u.firstPlug(exports.message_compose, {type: 'post'}, sbot), |
12 | content |
13 | ) |
14 | var render = ui.createRenderers(exports.message_render, sbot) |
15 | |
16 | pull( |
17 | sbot.createLogStream({old: false}), |
18 | Scroller(div, content, render, true, false) |
19 | ) |
20 | |
21 | pull( |
22 | u.next(sbot.createLogStream, {reverse: true, limit: 100, live: false}), |
23 | Scroller(div, content, render, false, false) |
24 | ) |
25 | |
26 | return div |
27 | } |
28 | } |
29 | |
30 | exports.message_render = [] |
31 | exports.message_compose = [] |
32 | |
33 | |
34 | |
35 | |
36 | |
37 | |
38 | |
39 | |
40 |
Built with git-ssb-web