git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: 4e87fb7f772146e90bc4f79a30bed7079d748a46

Files: 4e87fb7f772146e90bc4f79a30bed7079d748a46 / modules / data-feed.js

851 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' || path === '/data') {
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