git ssb

16+

Dominic / patchbay



Tree: 0e8042dde57ba8d7212909cd3677011b78124c5b

Files: 0e8042dde57ba8d7212909cd3677011b78124c5b / modules / public.js

877 bytesRaw
1var h = require('hyperscript')
2var ui = require('../ui')
3var u = require('../util')
4var pull = require('pull-stream')
5var Scroller = require('pull-scroll')
6
7var plugs = require('../plugs')
8var message_render = plugs.first(exports.message_render = [])
9var message_compose = plugs.first(exports.message_compose = [])
10var sbot_log = plugs.first(exports.sbot_log = [])
11
12exports.screen_view = function (path, sbot) {
13 if(path === '/public') {
14 var content = h('div.column')
15 var div = h('div.column',
16 {style: {'overflow':'auto'}},
17 message_compose({type: 'post'}), content
18 )
19
20 pull(
21 sbot_log({old: false}),
22 Scroller(div, content, message_render, true, false)
23 )
24
25 pull(
26 u.next(sbot_log, {reverse: true, limit: 100, live: false}),
27 Scroller(div, content, message_render, false, false)
28 )
29
30 return div
31 }
32}
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

Built with git-ssb-web