git ssb

16+

Dominic / patchbay



Tree: 560b4eeaebdc81616f23b3384a8c6ac9c0126e09

Files: 560b4eeaebdc81616f23b3384a8c6ac9c0126e09 / modules_extra / git-ssb.js

1131 bytesRaw
1var h = require('hyperscript')
2var u = require('../util')
3var pull = require('pull-stream')
4var Scroller = require('pull-scroll')
5
6var plugs = require('../plugs')
7var message_render = plugs.first(exports.message_render = [])
8var message_compose = plugs.first(exports.message_compose = [])
9var sbot_log = plugs.first(exports.sbot_log = [])
10
11exports.menu_items = function () {
12 return h('a', {href: '#/git-ssb'}, '/git-ssb')
13}
14
15exports.screen_view = function (path, sbot) {
16 if(path === '/git-ssb') {
17
18 var content = h('div.column.scroller__content')
19 var div = h('div.column.scroller',
20 {style: {'overflow':'auto'}},
21 h('div.scroller__wrapper', content)
22 )
23
24 pull(
25 u.next(sbot_log, {old: false, limit: 100}),
26 Scroller(div, content, message_render, true, false)
27 )
28
29 pull(
30 u.next(sbot_log, {reverse: true, limit: 100, live: false}),
31 pull.filter(function(msg) { return msg.value.content.type }),
32 pull.filter(function(msg) {
33 return msg.value.content.type.match(/^git/)
34 }),
35 Scroller(div, content, message_render, false, false)
36 )
37
38 return div
39 }
40}
41
42

Built with git-ssb-web