Commit d329f1c18ca119d1dbf61156fbba8b18bc65efc3
rename "main" to "public"
Dominic Tarr committed on 6/11/2016, 12:52:39 AMParent: 1db4707d2de0f5be43538cf89901d60b1b2d27d3
Files changed
modules/tabs.js | changed |
modules/main.js | deleted |
modules/public.js | added |
modules/tabs.js | ||
---|---|---|
@@ -19,10 +19,10 @@ | ||
19 | 19 | exports.app = function (_, sbot) { |
20 | 20 | var tabs = Tabs() |
21 | 21 | tabs.classList.add('screen') |
22 | 22 | |
23 | - var main = screen_view('/') | |
24 | - if(main) tabs.add('main', main, true) | |
23 | + var public = screen_view('/public') | |
24 | + if(public) tabs.add('public', public, true) | |
25 | 25 | |
26 | 26 | var private = screen_view('/private') |
27 | 27 | if(private) tabs.add('private', private, true) |
28 | 28 |
modules/main.js | ||
---|---|---|
@@ -1,48 +1,0 @@ | ||
1 | -var h = require('hyperscript') | |
2 | -var ui = require('../ui') | |
3 | -var u = require('../util') | |
4 | -var pull = require('pull-stream') | |
5 | -var Scroller = require('pull-scroll') | |
6 | - | |
7 | -var plugs = require('../plugs') | |
8 | -var message_render = plugs.first(exports.message_render = []) | |
9 | -var message_compose = plugs.first(exports.message_compose = []) | |
10 | -var sbot_log = plugs.first(exports.sbot_log = []) | |
11 | - | |
12 | -exports.screen_view = function (path, sbot) { | |
13 | - if(path === '/') { | |
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 | - |
modules/public.js | ||
---|---|---|
@@ -1,0 +1,48 @@ | ||
1 | +var h = require('hyperscript') | |
2 | +var ui = require('../ui') | |
3 | +var u = require('../util') | |
4 | +var pull = require('pull-stream') | |
5 | +var Scroller = require('pull-scroll') | |
6 | + | |
7 | +var plugs = require('../plugs') | |
8 | +var message_render = plugs.first(exports.message_render = []) | |
9 | +var message_compose = plugs.first(exports.message_compose = []) | |
10 | +var sbot_log = plugs.first(exports.sbot_log = []) | |
11 | + | |
12 | +exports.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 | + |
Built with git-ssb-web