git ssb

10+

Matt McKegg / patchwork



Tree: b6089670d854fcefa6bc5ca05636a801707deb30

Files: b6089670d854fcefa6bc5ca05636a801707deb30 / modules / data-feed.js

831 bytesRaw
1var h = require('hyperscript')
2var u = require('patchbay/util')
3var pull = require('pull-stream')
4var Scroller = require('pull-scroll')
5
6var plugs = require('patchbay/plugs')
7var sbot_log = plugs.first(exports.sbot_log = [])
8var data_render = plugs.first(exports.data_render = [])
9
10exports.screen_view = function (path, sbot) {
11 if(path === '/data-feed') {
12 var content = h('div.column.scroller__content')
13 var div = h('div.column.scroller',
14 {style: {'overflow':'auto'}},
15 h('div.scroller__wrapper',
16 content
17 )
18 )
19
20 pull(
21 u.next(sbot_log, {old: false, limit: 100}),
22 Scroller(div, content, data_render, true, false)
23 )
24
25 pull(
26 u.next(sbot_log, {reverse: true, limit: 100, live: false}),
27 Scroller(div, content, data_render, false, false)
28 )
29
30 return div
31 }
32}
33

Built with git-ssb-web