Commit d9ba09fe7118718dfeddc73ddab338839d9e78c7
Merge pull request #71 from ssbc/sorting_the_chaff
Sorting the chaffDominic Tarr authored on 1/18/2017, 11:46:25 AM
GitHub committed on 1/18/2017, 11:46:25 AM
Parent: f93ceefd06a4ef69e3af1d2fb39bc0fed84c2c7a
Parent: 87e8dd5ccef51221cc20ce6c491bfcb4d106f63b
Files changed
modules_basic/avatar-edit.js | ||
---|---|---|
@@ -5,22 +5,13 @@ | ||
5 | 5 … | var hyperlightbox = require('hyperlightbox') |
6 | 6 … | var h = require('hyperscript') |
7 | 7 … | var pull = require('pull-stream') |
8 | 8 … | var getAvatar = require('ssb-avatar') |
9 | -var plugs = require('../plugs') | |
10 | 9 … | var ref = require('ssb-ref') |
11 | 10 … | var visualize = require('visualize-buffer') |
12 | 11 … | var self_id = require('../keys').id |
13 | 12 … | |
14 | -//var confirm = plugs.first(exports.message_confirm = []) | |
15 | -//var sbot_blobs_add = plugs.first(exports.sbot_blobs_add = []) | |
16 | -//var blob_url = plugs.first(exports.blob_url = []) | |
17 | -//var sbot_links = plugs.first(exports.sbot_links = []) | |
18 | -//var avatar_name = plugs.first(exports.avatar_name = []) | |
19 | -// | |
20 | - | |
21 | 13 … | function crop (d, cb) { |
22 | - var data | |
23 | 14 … | var canvas = hypercrop(h('img', {src: d})) |
24 | 15 … | |
25 | 16 … | return h('div.column.avatar_pic', |
26 | 17 … | canvas, |
@@ -54,9 +45,9 @@ | ||
54 | 45 … | |
55 | 46 … | var lb = hyperlightbox() |
56 | 47 … | var name_input = h('input', {placeholder: 'rename'}) |
57 | 48 … | var name = api.avatar_name(id) |
58 | - var selected = null, selected_data = null | |
49 … | + var selected = null | |
59 | 50 … | |
60 | 51 … | getAvatar({links: api.sbot_links}, self_id, id, function (err, avatar) { |
61 | 52 … | if (err) return console.error(err) |
62 | 53 … | //don't show user has already selected an avatar. |
modules_basic/avatar-image.js | ||
---|---|---|
@@ -1,20 +1,12 @@ | ||
1 | 1 … | |
2 | -var getAvatar = require('ssb-avatar') | |
3 | 2 … | var h = require('hyperscript') |
4 | -var ref = require('ssb-ref') | |
5 | -var path = require('path') | |
6 | 3 … | var visualize = require('visualize-buffer') |
7 | 4 … | |
8 | 5 … | var pull = require('pull-stream') |
9 | 6 … | |
10 | 7 … | var self_id = require('../keys').id |
11 | 8 … | |
12 | -//var plugs = require('../plugs') | |
13 | -//var sbot_query = plugs.first(exports.sbot_query = []) | |
14 | -//var blob_url = require('../plugs').first(exports.blob_url = []) | |
15 | -// | |
16 | - | |
17 | 9 … | exports.needs = { |
18 | 10 … | sbot_query: 'first', |
19 | 11 … | blob_url: 'first' |
20 | 12 … | } |
@@ -22,14 +14,8 @@ | ||
22 | 14 … | exports.gives = { |
23 | 15 … | connection_status: true, avatar_image: true |
24 | 16 … | } |
25 | 17 … | |
26 | - | |
27 | -function isFunction (f) { | |
28 | - return 'function' === typeof f | |
29 | -} | |
30 | - | |
31 | - | |
32 | 18 … | var ready = false |
33 | 19 … | var waiting = [] |
34 | 20 … | |
35 | 21 … | var last = 0 |
@@ -113,5 +99,4 @@ | ||
113 | 99 … | return img |
114 | 100 … | } |
115 | 101 … | } |
116 | 102 … | } |
117 | - |
modules_basic/avatar-name.js | ||
---|---|---|
@@ -1,6 +1,4 @@ | ||
1 | - | |
2 | -var signifier = require('../plugs').first(exports.signifier = []) | |
3 | 1 … | var h = require('hyperscript') |
4 | 2 … | |
5 | 3 … | exports.needs = { signifier: 'first' } |
6 | 4 … |
modules_basic/avatar-profile.js | ||
---|---|---|
@@ -1,15 +1,7 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | 2 … | var pull = require('pull-stream') |
3 | 3 … | |
4 | -//var plugs = require('../plugs') | |
5 | -//var avatar_image_link = plugs.first(exports.avatar_image_link = []) | |
6 | -//var avatar_action = plugs.map(exports.avatar_action = []) | |
7 | -//var avatar_edit = plugs.first(exports.avatar_edit = []) | |
8 | - | |
9 | -//var follows = plugs.first(exports.follows = []) | |
10 | -//var followers = plugs.first(exports.followers = []) | |
11 | -// | |
12 | 4 … | exports.needs = { |
13 | 5 … | avatar_image_link: 'first', |
14 | 6 … | avatar_action: 'map', |
15 | 7 … | avatar_edit: 'first', |
@@ -84,5 +76,4 @@ | ||
84 | 76 … | ) |
85 | 77 … | } |
86 | 78 … | |
87 | 79 … | } |
88 | - |
modules_basic/avatar.js | ||
---|---|---|
@@ -1,6 +1,4 @@ | ||
1 | -var h = require('hyperscript') | |
2 | -var u = require('../util') | |
3 | 1 … | |
4 | 2 … | exports.needs = { |
5 | 3 … | avatar_name: 'first', |
6 | 4 … | avatar_image: 'first', |
modules_basic/compose.js | ||
---|---|---|
@@ -1,19 +1,11 @@ | ||
1 | 1 … | |
2 | 2 … | const fs = require('fs') |
3 | 3 … | const h = require('../h') |
4 | -const u = require('../util') | |
5 | 4 … | const suggest = require('suggest-box') |
6 | 5 … | const mentions = require('ssb-mentions') |
7 | 6 … | const cont = require('cont') |
8 | 7 … | |
9 | -//var plugs = require('../plugs') | |
10 | -//var suggest_mentions= plugs.asyncConcat(exports.suggest_mentions = []) | |
11 | -//var publish = plugs.first(exports.sbot_publish = []) | |
12 | -//var message_content = plugs.first(exports.message_content = []) | |
13 | -//var message_confirm = plugs.first(exports.message_confirm = []) | |
14 | -//var file_input = plugs.first(exports.file_input = []) | |
15 | - | |
16 | 8 … | exports.needs = { |
17 | 9 … | suggest_mentions: 'map', //<-- THIS MUST BE REWRITTEN |
18 | 10 … | publish: 'first', |
19 | 11 … | message_content: 'first', |
@@ -133,9 +125,9 @@ | ||
133 | 125 … | var actions = h('section.actions', [ |
134 | 126 … | fileInput, publishBtn |
135 | 127 … | ]) |
136 | 128 … | |
137 | - var composer = h('Compose', { | |
129 … | + var composer = h('Compose', { | |
138 | 130 … | className: opts.shrink === false ? '-expanded' : '-contracted' |
139 | 131 … | }, [ |
140 | 132 … | textArea, |
141 | 133 … | actions |
@@ -156,5 +148,4 @@ | ||
156 | 148 … | |
157 | 149 … | } |
158 | 150 … | |
159 | 151 … | function id (e) { return e } |
160 | - |
modules_basic/feed.js | ||
---|---|---|
@@ -3,14 +3,8 @@ | ||
3 | 3 … | var h = require('hyperscript') |
4 | 4 … | var pull = require('pull-stream') |
5 | 5 … | var u = require('../util') |
6 | 6 … | |
7 | -//var plugs = require('../plugs') | |
8 | -//var sbot_user_feed = plugs.first(exports.sbot_user_feed = []) | |
9 | -//var message_render = plugs.first(exports.message_render = []) | |
10 | -//var avatar_profile = plugs.first(exports.avatar_profile = []) | |
11 | -//var signifier = plugs.first(exports.signifier = []) | |
12 | - | |
13 | 7 … | exports.needs = { |
14 | 8 … | sbot_user_feed: 'first', |
15 | 9 … | message_render: 'first', |
16 | 10 … | avatar_profile: 'first', |
modules_basic/follow.js | ||
---|---|---|
@@ -1,15 +1,6 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | -var pull = require('pull-stream') | |
4 | 2 … | |
5 | -//var plugs = require('../plugs') | |
6 | -//var avatar = plugs.first(exports.avatar = []) | |
7 | -//var avatar_name = plugs.first(exports.avatar_name = []) | |
8 | -//var avatar_link = plugs.first(exports.avatar_link = []) | |
9 | -//var message_confirm = plugs.first(exports.message_confirm = []) | |
10 | -//var follower_of = plugs.first(exports.follower_of = []) | |
11 | - | |
12 | 3 … | //render a message when someone follows someone, |
13 | 4 … | //so you see new users |
14 | 5 … | function isRelated(value, name) { |
15 | 6 … | return value ? name : value === false ? 'un'+name : '' |
modules_basic/invite.js | ||
---|---|---|
@@ -5,13 +5,8 @@ | ||
5 | 5 … | var h = require('hyperscript') |
6 | 6 … | |
7 | 7 … | var Progress = require('hyperprogress') |
8 | 8 … | |
9 | -//var plugs = require('../plugs') | |
10 | -//var sbot_publish = plugs.first(exports.sbot_publish = []) | |
11 | -//var sbot_gossip_connect = plugs.first(exports.sbot_gossip_connect = []) | |
12 | -//var follower_of = plugs.first(exports.follower_of = []) | |
13 | - | |
14 | 9 … | exports.needs = { |
15 | 10 … | sbot_publish: 'first', |
16 | 11 … | sbot_gossip_connect: 'first', |
17 | 12 … | follower_of: 'first', |
modules_basic/like.js | ||
---|---|---|
@@ -1,15 +1,7 @@ | ||
1 | - | |
2 | 1 … | var h = require('hyperscript') |
3 | -var u = require('../util') | |
4 | 2 … | var pull = require('pull-stream') |
5 | 3 … | |
6 | -var plugs = require('../plugs') | |
7 | - | |
8 | -//var message_confirm = plugs.first(exports.message_confirm = []) | |
9 | -//var message_link = plugs.first(exports.message_link = []) | |
10 | -//var sbot_links = plugs.first(exports.sbot_links = []) | |
11 | - | |
12 | 4 … | exports.needs = { |
13 | 5 … | avatar_name: 'first', |
14 | 6 … | message_confirm: 'first', |
15 | 7 … | message_link: 'first', |
modules_basic/message-link.js | ||
---|---|---|
@@ -1,11 +1,7 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | 2 … | var ref = require('ssb-ref') |
3 | 3 … | |
4 | -//var first = require('../plugs').first | |
5 | -//var sbot_get = first(exports.sbot_get = []) | |
6 | -//var message_name = first(exports.message_name = []) | |
7 | - | |
8 | 4 … | exports.needs = { |
9 | 5 … | message_name: 'first' |
10 | 6 … | } |
11 | 7 … |
modules_basic/message.js | ||
---|---|---|
@@ -1,7 +1,5 @@ | ||
1 | 1 … | const fs = require('fs') |
2 | -const pull = require('pull-stream') | |
3 | -const u = require('../util') | |
4 | 2 … | const h = require('../h') |
5 | 3 … | |
6 | 4 … | exports.needs = { |
7 | 5 … | avatar_name: 'first', |
modules_basic/names.js | ||
---|---|---|
@@ -5,12 +5,8 @@ | ||
5 | 5 … | function all(stream, cb) { |
6 | 6 … | pull(stream, pull.collect(cb)) |
7 | 7 … | } |
8 | 8 … | |
9 | -//var plugs = require('../plugs') | |
10 | -//var sbot_links2 = plugs.first(exports.sbot_links2 = []) | |
11 | -//var sbot_query = plugs.first(exports.sbot_query = []) | |
12 | -// | |
13 | 9 … | exports.needs = { |
14 | 10 … | sbot_links2: 'first', |
15 | 11 … | sbot_query: 'first' |
16 | 12 … | } |
modules_basic/post.js | ||
---|---|---|
@@ -1,16 +1,8 @@ | ||
1 | -var markdown = require('ssb-markdown') | |
2 | 1 … | var h = require('hyperscript') |
3 | -var u = require('../util') | |
4 | -var ref = require('ssb-ref') | |
5 | 2 … | |
6 | 3 … | //render a message |
7 | 4 … | |
8 | -//var plugs = require('../plugs') | |
9 | -//var message_link = plugs.first(exports.message_link = []) | |
10 | -//var markdown = plugs.first(exports.markdown = []) | |
11 | -// | |
12 | - | |
13 | 5 … | exports.needs = { |
14 | 6 … | message_link: 'first', |
15 | 7 … | markdown: 'first' |
16 | 8 … | } |
modules_basic/pub.js | ||
---|---|---|
@@ -1,9 +1,6 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -//var plugs = require('../plugs') | |
3 | -//var avatar_name = plugs.first(exports.avatar_name = []) | |
4 | -//var avatar_link = plugs.first(exports.avatar_link = []) | |
5 | -// | |
2 … | + | |
6 | 3 … | exports.needs = { |
7 | 4 … | avatar_name: 'first', |
8 | 5 … | avatar_link: 'first' |
9 | 6 … | } |
modules_basic/public.js | ||
---|---|---|
@@ -2,13 +2,8 @@ | ||
2 | 2 … | var u = require('../util') |
3 | 3 … | var pull = require('pull-stream') |
4 | 4 … | var Scroller = require('pull-scroll') |
5 | 5 … | |
6 | -//var plugs = require('../plugs') | |
7 | -//var message_render = plugs.first(exports.message_render = []) | |
8 | -//var message_compose = plugs.first(exports.message_compose = []) | |
9 | -//var sbot_log = plugs.first(exports.sbot_log = []) | |
10 | - | |
11 | 6 … | exports.needs = { |
12 | 7 … | message_render: 'first', |
13 | 8 … | message_compose: 'first', |
14 | 9 … | sbot_log: 'first', |
modules_basic/relationships.js | ||
---|---|---|
@@ -1,11 +1,6 @@ | ||
1 | 1 … | var pull = require('pull-stream') |
2 | -//var plugs = require('../plugs') | |
3 | 2 … | |
4 | -//var sbot_query = plugs.first(exports.sbot_query = []) | |
5 | - | |
6 | -//this is a bit crude, and doesn't actually show unfollows yet. | |
7 | - | |
8 | 3 … | function makeQuery (a, b) { |
9 | 4 … | return {"$filter": { |
10 | 5 … | value: { |
11 | 6 … | author: a, |
modules_basic/search-box.js | ||
---|---|---|
@@ -1,22 +1,14 @@ | ||
1 | 1 … | |
2 | 2 … | var cont = require('cont') |
3 | 3 … | var h = require('hyperscript') |
4 | 4 … | var suggest = require('suggest-box') |
5 | -var pull = require('pull-stream') | |
6 | 5 … | |
7 | -//var plugs = require('../plugs') | |
8 | -//var sbot_query = plugs.first(exports.sbot_query = []) | |
9 | -//var sbot_links2 = plugs.first(exports.sbot_links2 = []) | |
10 | -//var suggest_search = plugs.asyncConcat(exports.suggest_search = []) | |
11 | - | |
12 | 6 … | exports.needs = { |
13 | 7 … | sbot_query: 'first', sbot_links2: 'first', |
14 | 8 … | suggest_search: 'map' //REWRITE |
15 | 9 … | } |
16 | 10 … | |
17 | -var channels = [] | |
18 | - | |
19 | 11 … | exports.gives = 'search_box' |
20 | 12 … | |
21 | 13 … | exports.create = function (api) { |
22 | 14 … | |
@@ -54,10 +46,8 @@ | ||
54 | 46 … | search.value = sigil |
55 | 47 … | } |
56 | 48 … | } |
57 | 49 … | |
58 | - var suggestions = {} | |
59 | - | |
60 | 50 … | // delay until the element has a parent |
61 | 51 … | setTimeout(function () { |
62 | 52 … | suggestBox = suggest(search, function (word, cb) { |
63 | 53 … | cont.para(api.suggest_search(word)) |
modules_basic/setup.js | ||
---|---|---|
@@ -1,17 +1,8 @@ | ||
1 | 1 … | |
2 | 2 … | var h = require('hyperscript') |
3 | 3 … | var pull = require('pull-stream') |
4 | 4 … | |
5 | -//var plugs = require('../plugs') | |
6 | -// | |
7 | -//var avatar_edit = plugs.first(exports.avatar_edit = []) | |
8 | -//var invite_parse = plugs.first(exports.invite_parse = []) | |
9 | -//var invite_accept = plugs.first(exports.invite_accept = []) | |
10 | -//var sbot_progress = plugs.first(exports.sbot_progress = []) | |
11 | -//var sbot_query = plugs.first(exports.sbot_query = []) | |
12 | -//var avatar = plugs.first(exports.avatar = []) | |
13 | - | |
14 | 5 … | exports.needs = { |
15 | 6 … | avatar: 'first', |
16 | 7 … | avatar_edit: 'first', |
17 | 8 … | invite_parse: 'first', |
@@ -128,18 +119,15 @@ | ||
128 | 119 … | return joined |
129 | 120 … | } |
130 | 121 … | |
131 | 122 … | exports.screen_view = function (path) { |
132 | - | |
133 | 123 … | if(path !== '/setup') return |
134 | 124 … | |
135 | 125 … | var id = require('../keys').id |
136 | 126 … | |
137 | 127 … | //set up an avatar |
138 | 128 … | |
139 | - | |
140 | 129 … | var status = h('span') |
141 | - var invite = h('input', {placeholder: 'invite code'}) | |
142 | 130 … | return h('div.scroller', h('div.scroller__wrapper', |
143 | 131 … | h('h1', 'welcome to patchbay!'), |
144 | 132 … | h('div', |
145 | 133 … | 'please choose avatar image and name', |
modules_basic/suggest-mentions.js | ||
---|---|---|
@@ -1,14 +1,5 @@ | ||
1 | -var pull = require('pull-stream') | |
2 | -function isImage (filename) { | |
3 | - return /\.(gif|jpg|png|svg)$/i.test(filename) | |
4 | -} | |
5 | 1 … | |
6 | -//var sbot_links2 = require('../plugs').first(exports.sbot_links2 = []) | |
7 | -//var blob_url = require('../plugs').first(exports.blob_url = []) | |
8 | -//var signified = require('../plugs').first(exports.signified = []) | |
9 | -//var builtin_tabs = require('../plugs').map(exports.builtin_tabs = []) | |
10 | - | |
11 | 2 … | exports.needs = { |
12 | 3 … | sbot_links2: 'first', |
13 | 4 … | blob_url: 'first', |
14 | 5 … | signified: 'first', |
modules_basic/thread.js | ||
---|---|---|
@@ -1,11 +1,8 @@ | ||
1 | 1 … | var pull = require('pull-stream') |
2 | -var Cat = require('pull-cat') | |
3 | 2 … | var sort = require('ssb-sort') |
4 | 3 … | var ref = require('ssb-ref') |
5 | 4 … | var h = require('hyperscript') |
6 | -var u = require('../util') | |
7 | -var Scroller = require('pull-scroll') | |
8 | 5 … | var self_id = require('../keys').id |
9 | 6 … | |
10 | 7 … | function once (cont) { |
11 | 8 … | var ended = false |
@@ -20,18 +17,8 @@ | ||
20 | 17 … | }) |
21 | 18 … | } |
22 | 19 … | } |
23 | 20 … | |
24 | -//var plugs = require('../plugs') | |
25 | -// | |
26 | -//var message_render = plugs.first(exports.message_render = []) | |
27 | -//var message_name = plugs.first(exports.message_name = []) | |
28 | -//var message_compose = plugs.first(exports.message_compose = []) | |
29 | -//var message_unbox = plugs.first(exports.message_unbox = []) | |
30 | -// | |
31 | -//var sbot_get = plugs.first(exports.sbot_get = []) | |
32 | -//var sbot_links = plugs.first(exports.sbot_links = []) | |
33 | - | |
34 | 21 … | exports.needs = { |
35 | 22 … | message_render: 'first', |
36 | 23 … | message_name: 'first', |
37 | 24 … | message_compose: 'first', |
modules_core/app.js | ||
---|---|---|
@@ -1,5 +1,4 @@ | ||
1 | -var plugs = require('../plugs') | |
2 | 1 … | var h = require('hyperscript') |
3 | 2 … | var insertCss = require('insert-css') |
4 | 3 … | |
5 | 4 … | module.exports = { |
@@ -24,9 +23,8 @@ | ||
24 | 23 … | function hash() { |
25 | 24 … | return window.location.hash.substring(1) |
26 | 25 … | } |
27 | 26 … | |
28 | - console.log(hash() || 'tabs') | |
29 | 27 … | var view = api.screen_view(hash() || 'tabs') |
30 | 28 … | |
31 | 29 … | var screen = h('div.screen.column', view) |
32 | 30 … |
modules_core/file-input.js | ||
---|---|---|
@@ -1,5 +1,4 @@ | ||
1 | -var u = require('../util') | |
2 | 1 … | var h = require('hyperscript') |
3 | 2 … | var pull = require('pull-stream') |
4 | 3 … | var mime = require('simple-mime')('application/octect-stream') |
5 | 4 … | var split = require('split-buffer') |
modules_core/menu.js | ||
---|---|---|
@@ -1,13 +1,12 @@ | ||
1 | -var plugs = require('../plugs') | |
2 | 1 … | var h = require('hyperscript') |
3 | 2 … | |
4 | 3 … | module.exports = { |
5 | 4 … | needs: {menu_items: 'map'}, |
6 | 5 … | gives: {connection_status: true, menu: true}, |
7 | 6 … | create: function (api) { |
8 | 7 … | |
9 | - var menu_items = api.menu_items //plugs.map(exports.menu_items = []) | |
8 … | + var menu_items = api.menu_items | |
10 | 9 … | |
11 | 10 … | var status = h('div.status.error') //start off disconnected |
12 | 11 … | var list = h('div.menu.column', {style: 'display: none;'}) |
13 | 12 … |
modules_core/message-confirm.js | ||
---|---|---|
@@ -1,13 +1,10 @@ | ||
1 | 1 … | var fs = require('fs') |
2 | 2 … | var lightbox = require('hyperlightbox') |
3 | 3 … | var h = require('../h') |
4 | -var u = require('../util') | |
5 | 4 … | var self_id = require('../keys').id |
6 | 5 … | //publish or add |
7 | 6 … | |
8 | -var plugs = require('../plugs') | |
9 | - | |
10 | 7 … | exports.needs = { |
11 | 8 … | publish: 'first', |
12 | 9 … | message_render: 'first', |
13 | 10 … | avatar: 'first', |
modules_core/styles.js | ||
---|---|---|
@@ -1,5 +1,4 @@ | ||
1 | -var h = require('../h') | |
2 | 1 … | var compile = require('micro-css') |
3 | 2 … | var fs = require('fs') |
4 | 3 … | var Path = require('path') |
5 | 4 … |
modules_core/tabs.js | ||
---|---|---|
@@ -1,8 +1,6 @@ | ||
1 | 1 … | var Tabs = require('hypertabs') |
2 | 2 … | var h = require('hyperscript') |
3 | -var pull = require('pull-stream') | |
4 | -var u = require('../util') | |
5 | 3 … | var keyscroll = require('../keyscroll') |
6 | 4 … | var open = require('open-external') |
7 | 5 … | |
8 | 6 … | function ancestor (el) { |
@@ -10,13 +8,8 @@ | ||
10 | 8 … | if(el.tagName !== 'A') return ancestor(el.parentElement) |
11 | 9 … | return el |
12 | 10 … | } |
13 | 11 … | |
14 | -//var plugs = require('../plugs') | |
15 | -//var screen_view = plugs.first(exports._screen_view = []) | |
16 | -//var search_box = plugs.first(exports.search_box = []) | |
17 | -//var menu = plugs.first(exports.menu = []) | |
18 | - | |
19 | 12 … | exports.needs = {screen_view: 'first', search_box: 'first', menu: 'first', 'external_confirm':'first'} |
20 | 13 … | |
21 | 14 … | exports.gives = 'screen_view' |
22 | 15 … |
modules_extra/audio-mp3.js | ||
---|---|---|
@@ -4,14 +4,8 @@ | ||
4 | 4 … | var ref = require('ssb-ref'); |
5 | 5 … | |
6 | 6 … | //render a message |
7 | 7 … | |
8 | -//var plugs = require('../plugs'); | |
9 | -//var message_link = plugs.first(exports.message_link = []); | |
10 | -//var message_confirm = plugs.first(exports.message_confirm = []); | |
11 | -//var sbot_links = plugs.first(exports.sbot_links = []); | |
12 | -//var blob_url = plugs.first(exports.blob_url = []); | |
13 | -// | |
14 | 8 … | exports.needs = { |
15 | 9 … | // message_link: 'first', |
16 | 10 … | // message_confirm: 'first', |
17 | 11 … | // sbot_links: 'first', |
modules_extra/channel.js | ||
---|---|---|
@@ -1,6 +1,5 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | 2 … | var pull = require('pull-stream') |
4 | 3 … | var Scroller = require('pull-scroll') |
5 | 4 … | var mfr = require('map-filter-reduce') |
6 | 5 … |
modules_extra/emoji.js | ||
---|---|---|
@@ -1,11 +1,7 @@ | ||
1 | 1 … | var emojis = require('emoji-named-characters') |
2 | 2 … | var emojiNames = Object.keys(emojis) |
3 | 3 … | |
4 | -//var plugs = require('../plugs') | |
5 | -//var blob_url = plugs.first(exports.blob_url = []) | |
6 | -// | |
7 | - | |
8 | 4 … | exports.needs = { blob_url: 'first' } |
9 | 5 … | exports.gives = { emoji_names: true, emoji_url: true } |
10 | 6 … | |
11 | 7 … | exports.create = function (api) { |
modules_extra/git-ssb.js | ||
---|---|---|
@@ -2,13 +2,8 @@ | ||
2 | 2 … | var u = require('../util') |
3 | 3 … | var pull = require('pull-stream') |
4 | 4 … | var Scroller = require('pull-scroll') |
5 | 5 … | |
6 | -//var plugs = require('../plugs') | |
7 | -//var message_render = plugs.first(exports.message_render = []) | |
8 | -//var message_compose = plugs.first(exports.message_compose = []) | |
9 | -//var sbot_log = plugs.first(exports.sbot_log = []) | |
10 | - | |
11 | 6 … | exports.needs = { |
12 | 7 … | message_render: 'first', |
13 | 8 … | message_compose: 'first', |
14 | 9 … | sbot_log: 'first' |
modules_extra/git.js | ||
---|---|---|
@@ -9,18 +9,8 @@ | ||
9 | 9 … | var getAvatar = require('ssb-avatar') |
10 | 10 … | var KVGraph = require('kvgraph') |
11 | 11 … | var mergeRepo = require('ssb-git/merge') |
12 | 12 … | |
13 | -//var plugs = require('../plugs') | |
14 | -//var message_link = plugs.first(exports.message_link = []) | |
15 | -//var message_confirm = plugs.first(exports.message_confirm = []) | |
16 | -//var message_compose = plugs.first(exports.message_compose = []) | |
17 | -//var sbot_links = plugs.first(exports.sbot_links = []) | |
18 | -//var sbot_links2 = plugs.first(exports.sbot_links2 = []) | |
19 | -//var sbot_get = plugs.first(exports.sbot_get = []) | |
20 | -//var avatar_name = plugs.first(exports.avatar_name = []) | |
21 | -//var markdown = plugs.first(exports.markdown = []) | |
22 | - | |
23 | 13 … | exports.needs = { |
24 | 14 … | message_link: 'first', |
25 | 15 … | message_confirm: 'first', |
26 | 16 … | message_compose: 'first', |
modules_extra/key.js | ||
---|---|---|
@@ -1,15 +1,6 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | -var pull = require('pull-stream') | |
4 | -var Scroller = require('pull-scroll') | |
5 | 2 … | |
6 | -//var plugs = require('../plugs') | |
7 | -// var message_render = plugs.first(exports.message_render = []) | |
8 | -// var message_compose = plugs.first(exports.message_compose = []) | |
9 | -// var sbot_log = plugs.first(exports.sbot_log = []) | |
10 | - | |
11 | - | |
12 | 3 … | exports.gives = { |
13 | 4 … | menu_items: true, screen_view: true |
14 | 5 … | } |
15 | 6 … | |
@@ -22,10 +13,10 @@ | ||
22 | 13 … | if(path === '/key') { |
23 | 14 … | if(process.title === 'browser') { |
24 | 15 … | var importKey = h('textarea', {placeholder: 'import an existing public/private key', name: 'textarea'}) |
25 | 16 … | var importRemote = h('textarea', {placeholder: 'import an existing remote', name: 'textarea'}) |
26 | - var content = h('div.column.scroller__content') | |
27 | - var div = h('div.column.scroller', | |
17 … | + | |
18 … | + return h('div.column.scroller', | |
28 | 19 … | {style: {'overflow':'auto'}}, |
29 | 20 … | h('div.scroller__wrapper', |
30 | 21 … | h('div.column.scroller__content', |
31 | 22 … | h('div.message', |
@@ -50,9 +41,8 @@ | ||
50 | 41 … | ) |
51 | 42 … | ) |
52 | 43 … | ) |
53 | 44 … | ) |
54 | - return div | |
55 | 45 … | } else { |
56 | 46 … | return h('p', 'Your key is saved at .ssb/secret') |
57 | 47 … | } |
58 | 48 … | } |
modules_extra/meta-image.js | ||
---|---|---|
@@ -1,17 +1,8 @@ | ||
1 | -var markdown = require('ssb-markdown'); | |
2 | 1 … | var h = require('hyperscript'); |
3 | -var u = require('../util'); | |
4 | -var ref = require('ssb-ref'); | |
5 | 2 … | |
6 | 3 … | //render a message |
7 | 4 … | |
8 | -//var plugs = require('../plugs'); | |
9 | -//var message_link = plugs.first(exports.message_link = []); | |
10 | -//var message_confirm = plugs.first(exports.message_confirm = []); | |
11 | -//var sbot_links = plugs.first(exports.sbot_links = []); | |
12 | -//var blob_url = plugs.first(exports.blob_url = []); | |
13 | -// | |
14 | 5 … | exports.needs = { blob_url: 'first' } |
15 | 6 … | exports.gives = 'message_content' |
16 | 7 … | |
17 | 8 … | exports.create = function (api) { |
modules_extra/music-release-cc.js | ||
---|---|---|
@@ -4,15 +4,8 @@ | ||
4 | 4 … | var ref = require('ssb-ref'); |
5 | 5 … | |
6 | 6 … | //render a message |
7 | 7 … | |
8 | -//var plugs = require('../plugs'); | |
9 | -//var message_link = plugs.first(exports.message_link = []); | |
10 | -//var message_confirm = plugs.first(exports.message_confirm = []); | |
11 | -//var sbot_links = plugs.first(exports.sbot_links = []); | |
12 | -//var blob_url = plugs.first(exports.blob_url = []); | |
13 | -// | |
14 | - | |
15 | 8 … | exports.needs = { blob_url: 'first' } |
16 | 9 … | exports.gives = 'message_content' |
17 | 10 … | |
18 | 11 … | exports.create = function (api) { |
modules_extra/music-release.js | ||
---|---|---|
@@ -4,13 +4,8 @@ | ||
4 | 4 … | var ref = require('ssb-ref'); |
5 | 5 … | |
6 | 6 … | //render a message |
7 | 7 … | |
8 | -//var plugs = require('../plugs'); | |
9 | -//var message_link = plugs.first(exports.message_link = []); | |
10 | -//var message_confirm = plugs.first(exports.message_confirm = []); | |
11 | -//var sbot_links = plugs.first(exports.sbot_links = []); | |
12 | -// | |
13 | 8 … | exports.gives = 'message_content' |
14 | 9 … | |
15 | 10 … | exports.create = function () { |
16 | 11 … |
modules_extra/network.js | ||
---|---|---|
@@ -7,12 +7,8 @@ | ||
7 | 7 … | Struct, Value, Dict, |
8 | 8 … | dictToCollection, map: mutantMap, when, computed |
9 | 9 … | } = require('@mmckegg/mutant') |
10 | 10 … | |
11 | -//var avatar = plugs.first(exports.avatar = []) | |
12 | -//var sbot_gossip_peers = plugs.first(exports.sbot_gossip_peers = []) | |
13 | -//var sbot_gossip_connect = plugs.first(exports.sbot_gossip_connect = []) | |
14 | - | |
15 | 11 … | exports.needs = { |
16 | 12 … | avatar_image_link: 'first', |
17 | 13 … | avatar_name_link: 'first', |
18 | 14 … | sbot_gossip_peers: 'first', |
modules_extra/notifications.js | ||
---|---|---|
@@ -3,18 +3,11 @@ | ||
3 | 3 … | var u = require('../util') |
4 | 4 … | var pull = require('pull-stream') |
5 | 5 … | var Scroller = require('pull-scroll') |
6 | 6 … | var paramap = require('pull-paramap') |
7 | -var plugs = require('../plugs') | |
8 | 7 … | var cont = require('cont') |
9 | 8 … | var ref = require('ssb-ref') |
10 | 9 … | |
11 | -//var message_render = plugs.first(exports.message_render = []) | |
12 | -//var sbot_log = plugs.first(exports.sbot_log = []) | |
13 | -//var sbot_get = plugs.first(exports.sbot_get = []) | |
14 | -//var sbot_user_feed = plugs.first(exports.sbot_user_feed = []) | |
15 | -//var message_unbox = plugs.first(exports.message_unbox = []) | |
16 | - | |
17 | 10 … | exports.needs = { |
18 | 11 … | message_render: 'first', |
19 | 12 … | sbot_log: 'first', |
20 | 13 … | sbot_get: 'first', |
modules_extra/query.js | |||
---|---|---|---|
@@ -1,10 +1,8 @@ | |||
1 | 1 … | var h = require('hyperscript') | |
2 | 2 … | var pull = require('pull-stream') | |
3 | 3 … | var HJSON = require('hjson') | |
4 | 4 … | ||
5 | -//var sbot_query = require('../plugs').first(exports.sbot_query = []) | ||
6 | - | ||
7 | 5 … | exports.needs = { sbot_query: 'first' } | |
8 | 6 … | ||
9 | 7 … | exports.gives = { | |
10 | 8 … | menu_items: true, |
modules_extra/raw.js | ||
---|---|---|
@@ -1,13 +1,6 @@ | ||
1 | 1 … | var h = require('hyperscript') |
2 | -var u = require('../util') | |
3 | -var pull = require('pull-stream') | |
4 | -var Scroller = require('pull-scroll') | |
5 | 2 … | |
6 | -var plugs = require('../plugs') | |
7 | -//var message_render = plugs.first(exports.message_render = []) | |
8 | -//var message_compose = plugs.first(exports.message_compose = []) | |
9 | - | |
10 | 3 … | // from ssb-ref |
11 | 4 … | var refRegex = /((?:@|%|&)[A-Za-z0-9\/+]{43}=\.[\w\d]+)/g |
12 | 5 … | |
13 | 6 … | exports.gives = 'message_meta' |
modules_extra/search.js | ||
---|---|---|
@@ -3,12 +3,8 @@ | ||
3 | 3 … | var pull = require('pull-stream') |
4 | 4 … | var Scroller = require('pull-scroll') |
5 | 5 … | var TextNodeSearcher = require('text-node-searcher') |
6 | 6 … | |
7 | -//var plugs = require('../plugs') | |
8 | -//var message_render = plugs.first(exports.message_render = []) | |
9 | -//var sbot_log = plugs.first(exports.sbot_log = []) | |
10 | - | |
11 | 7 … | exports.needs = { |
12 | 8 … | message_render: 'first', |
13 | 9 … | sbot_log: 'first' |
14 | 10 … | } |
Built with git-ssb-web