git ssb

16+

Dominic / patchbay



Tree: 6101ce9d646a3660d7adcbf2b9ce1e567827f4ae

Files: 6101ce9d646a3660d7adcbf2b9ce1e567827f4ae / modules / public.js

1048 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
12var HighWatermark = require('pull-high-watermark')
13
14exports.screen_view = function (path, sbot) {
15 if(path === '/public') {
16
17 var content = h('div.column.scroller__content')
18 var div = h('div.column.scroller',
19 {style: {'overflow':'auto'}},
20 h('div.scroller__wrapper',
21 message_compose({type: 'post'}), //header
22 content
23 )
24 )
25
26 pull(
27 sbot_log({old: false}),
28 Scroller(div, content, message_render, true, false)
29 )
30
31 pull(
32 u.next(sbot_log, {reverse: true, limit: 100, live: false}),
33// HighWatermark(100),
34 Scroller(div, content, message_render, false, false)
35 )
36
37 return div
38 }
39}
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

Built with git-ssb-web