git ssb

16+

Dominic / patchbay



Commit 3c201fb3cd2ad22f338850c91b72818022074849

Merge branch 'master' into message_modules_folder

mix irving committed on 1/19/2017, 3:20:13 AM
Parent: 301f073d02f96f4788640d5dc8440c912c7aace9
Parent: 1f66b9d5a43300423b755e4664f3b1ec5c349044

Files changed

modules_basic/avatar/avatar.jschanged
modules_basic/avatar/edit.jschanged
modules_basic/avatar/image.jschanged
modules_basic/avatar/profile.jschanged
modules_basic/compose.jschanged
modules_basic/follow.jschanged
modules_basic/like.jschanged
modules_basic/message/render.jschanged
modules_basic/post.jschanged
modules_basic/search-box.jschanged
modules_basic/setup.jschanged
modules_basic/suggest-mentions.jschanged
modules_basic/thread.jschanged
modules_core/file-input.jschanged
modules_core/message/confirm.jschanged
modules_core/style/styles.jschanged
modules_core/tabs.jschanged
modules_extra/channel.jschanged
modules_extra/git.jschanged
modules_extra/key.jschanged
modules_extra/meta-image.jschanged
modules_extra/raw.jschanged
modules_extra/music-release.jsadded
package.jsonchanged
modules_basic/avatar/avatar.jsView
@@ -1,6 +1,4 @@
1-var h = require('hyperscript')
2-var u = require('../../util')
31
42 exports.needs = {
53 avatar_name: 'first',
64 avatar_image: 'first',
modules_basic/avatar/edit.jsView
@@ -10,9 +10,8 @@
1010 var visualize = require('visualize-buffer')
1111 var self_id = require('../../keys').id
1212
1313 function crop (d, cb) {
14- var data
1514 var canvas = hypercrop(h('img', {src: d}))
1615
1716 return h('div.column.avatar_pic',
1817 canvas,
@@ -46,9 +45,9 @@
4645
4746 var lb = hyperlightbox()
4847 var name_input = h('input', {placeholder: 'rename'})
4948 var name = api.avatar_name(id)
50- var selected = null, selected_data = null
49 + var selected = null
5150
5251 getAvatar({links: api.sbot_links}, self_id, id, function (err, avatar) {
5352 if (err) return console.error(err)
5453 //don't show user has already selected an avatar.
modules_basic/avatar/image.jsView
@@ -1,9 +1,6 @@
11 'use strict'
2-var getAvatar = require('ssb-avatar')
32 var h = require('hyperscript')
4-var ref = require('ssb-ref')
5-var path = require('path')
63 var visualize = require('visualize-buffer')
74
85 var pull = require('pull-stream')
96
@@ -17,13 +14,8 @@
1714 exports.gives = {
1815 connection_status: true, avatar_image: true
1916 }
2017
21-function isFunction (f) {
22- return 'function' === typeof f
23-}
24-
25-
2618 var ready = false
2719 var waiting = []
2820
2921 var last = 0
@@ -107,5 +99,4 @@
10799 return img
108100 }
109101 }
110102 }
111-
modules_basic/avatar/profile.jsView
@@ -76,5 +76,4 @@
7676 )
7777 }
7878
7979 }
80-
modules_basic/compose.jsView
@@ -1,8 +1,7 @@
11 'use strict'
22 const fs = require('fs')
33 const h = require('../h')
4-const u = require('../util')
54 const suggest = require('suggest-box')
65 const mentions = require('ssb-mentions')
76 const cont = require('cont')
87
@@ -126,9 +125,9 @@
126125 var actions = h('section.actions', [
127126 fileInput, publishBtn
128127 ])
129128
130- var composer = h('Compose', {
129 + var composer = h('Compose', {
131130 className: opts.shrink === false ? '-expanded' : '-contracted'
132131 }, [
133132 textArea,
134133 actions
@@ -149,5 +148,4 @@
149148
150149 }
151150
152151 function id (e) { return e }
153-
modules_basic/follow.jsView
@@ -1,9 +1,6 @@
11 var h = require('hyperscript')
2-var u = require('../util')
3-var pull = require('pull-stream')
42
5-
63 //render a message when someone follows someone,
74 //so you see new users
85 function isRelated(value, name) {
96 return value ? name : value === false ? 'un'+name : ''
modules_basic/like.jsView
@@ -1,7 +1,5 @@
1-
21 var h = require('hyperscript')
3-var u = require('../util')
42 var pull = require('pull-stream')
53
64 exports.needs = {
75 avatar_name: 'first',
modules_basic/message/render.jsView
@@ -1,7 +1,5 @@
11 const fs = require('fs')
2-const pull = require('pull-stream')
3-const u = require('../../util')
42 const h = require('../../h')
53
64 exports.needs = {
75 avatar_name: 'first',
modules_basic/post.jsView
@@ -1,8 +1,5 @@
1-var markdown = require('ssb-markdown')
21 var h = require('hyperscript')
3-var u = require('../util')
4-var ref = require('ssb-ref')
52
63 //render a message
74
85 exports.needs = {
modules_basic/search-box.jsView
@@ -1,17 +1,14 @@
11 'use strict'
22 var cont = require('cont')
33 var h = require('hyperscript')
44 var suggest = require('suggest-box')
5-var pull = require('pull-stream')
65
76 exports.needs = {
87 sbot_query: 'first', sbot_links2: 'first',
98 suggest_search: 'map' //REWRITE
109 }
1110
12-var channels = []
13-
1411 exports.gives = 'search_box'
1512
1613 exports.create = function (api) {
1714
@@ -49,10 +46,8 @@
4946 search.value = sigil
5047 }
5148 }
5249
53- var suggestions = {}
54-
5550 // delay until the element has a parent
5651 setTimeout(function () {
5752 suggestBox = suggest(search, function (word, cb) {
5853 cont.para(api.suggest_search(word))
modules_basic/setup.jsView
@@ -119,18 +119,15 @@
119119 return joined
120120 }
121121
122122 exports.screen_view = function (path) {
123-
124123 if(path !== '/setup') return
125124
126125 var id = require('../keys').id
127126
128127 //set up an avatar
129128
130-
131129 var status = h('span')
132- var invite = h('input', {placeholder: 'invite code'})
133130 return h('div.scroller', h('div.scroller__wrapper',
134131 h('h1', 'welcome to patchbay!'),
135132 h('div',
136133 'please choose avatar image and name',
modules_basic/suggest-mentions.jsView
@@ -1,8 +1,4 @@
1-var pull = require('pull-stream')
2-function isImage (filename) {
3- return /\.(gif|jpg|png|svg)$/i.test(filename)
4-}
51
62 exports.needs = {
73 sbot_links2: 'first',
84 blob_url: 'first',
modules_basic/thread.jsView
@@ -1,11 +1,8 @@
11 var pull = require('pull-stream')
2-var Cat = require('pull-cat')
32 var sort = require('ssb-sort')
43 var ref = require('ssb-ref')
54 var h = require('hyperscript')
6-var u = require('../util')
7-var Scroller = require('pull-scroll')
85 var self_id = require('../keys').id
96
107 function once (cont) {
118 var ended = false
modules_core/file-input.jsView
@@ -1,5 +1,4 @@
1-var u = require('../util')
21 var h = require('hyperscript')
32 var pull = require('pull-stream')
43 var mime = require('simple-mime')('application/octect-stream')
54 var split = require('split-buffer')
modules_core/message/confirm.jsView
@@ -1,8 +1,7 @@
11 var fs = require('fs')
22 var lightbox = require('hyperlightbox')
33 var h = require('../../h')
4-var u = require('../../util')
54 var self_id = require('../../keys').id
65 //publish or add
76
87 exports.needs = {
modules_core/style/styles.jsView
@@ -1,5 +1,4 @@
1-var h = require('../../h')
21 var compile = require('micro-css')
32 var fs = require('fs')
43 var Path = require('path')
54
modules_core/tabs.jsView
@@ -1,8 +1,6 @@
11 var Tabs = require('hypertabs')
22 var h = require('hyperscript')
3-var pull = require('pull-stream')
4-var u = require('../util')
53 var keyscroll = require('../keyscroll')
64 var open = require('open-external')
75
86 function ancestor (el) {
@@ -14,9 +12,9 @@
1412 exports.needs = {
1513 screen_view: 'first',
1614 search_box: 'first',
1715 menu: 'first',
18- 'external_confirm':'first'
16 + external_confirm:'first'
1917 }
2018
2119 exports.gives = 'screen_view'
2220
modules_extra/channel.jsView
@@ -1,6 +1,5 @@
11 var h = require('hyperscript')
2-var u = require('../util')
32 var pull = require('pull-stream')
43 var Scroller = require('pull-scroll')
54 var mfr = require('map-filter-reduce')
65
modules_extra/git.jsView
@@ -9,9 +9,8 @@
99 var getAvatar = require('ssb-avatar')
1010 var KVGraph = require('kvgraph')
1111 var mergeRepo = require('ssb-git/merge')
1212
13-
1413 exports.needs = {
1514 message_link: 'first',
1615 message_confirm: 'first',
1716 message_compose: 'first',
modules_extra/key.jsView
@@ -1,10 +1,6 @@
11 var h = require('hyperscript')
2-var u = require('../util')
3-var pull = require('pull-stream')
4-var Scroller = require('pull-scroll')
52
6-
73 exports.gives = {
84 menu_items: true,
95 screen_view: true
106 }
@@ -18,10 +14,10 @@
1814 if(path === '/key') {
1915 if(process.title === 'browser') {
2016 var importKey = h('textarea', {placeholder: 'import an existing public/private key', name: 'textarea'})
2117 var importRemote = h('textarea', {placeholder: 'import an existing remote', name: 'textarea'})
22- var content = h('div.column.scroller__content')
23- var div = h('div.column.scroller',
18 +
19 + return h('div.column.scroller',
2420 {style: {'overflow':'auto'}},
2521 h('div.scroller__wrapper',
2622 h('div.column.scroller__content',
2723 h('div.message',
@@ -46,9 +42,8 @@
4642 )
4743 )
4844 )
4945 )
50- return div
5146 } else {
5247 return h('p', 'Your key is saved at .ssb/secret')
5348 }
5449 }
modules_extra/meta-image.jsView
@@ -1,8 +1,5 @@
1-var markdown = require('ssb-markdown');
21 var h = require('hyperscript');
3-var u = require('../util');
4-var ref = require('ssb-ref');
52
63 //render a message
74
85 exports.needs = { blob_url: 'first' }
modules_extra/raw.jsView
@@ -1,8 +1,5 @@
11 var h = require('hyperscript')
2-var u = require('../util')
3-var pull = require('pull-stream')
4-var Scroller = require('pull-scroll')
52
63 // from ssb-ref
74 var refRegex = /((?:@|%|&)[A-Za-z0-9\/+]{43}=\.[\w\d]+)/g
85
modules_extra/music-release.jsView
@@ -1,0 +1,41 @@
1 +var markdown = require('ssb-markdown');
2 +var h = require('hyperscript');
3 +var u = require('../util');
4 +var ref = require('ssb-ref');
5 +
6 +//render a message
7 +
8 +exports.gives = 'message_content'
9 +
10 +exports.create = function () {
11 +
12 + return function(msg, sbot) {
13 + if (msg.value.content.type !== 'music-release')
14 + return;
15 +
16 + var v = msg.value.content;
17 + return h('div',
18 + // h('img', { "src" : "http://localhost:7777/" + encodeURIComponent(v.cover) }),
19 + h('h1', v.Title),
20 + h("p", v.Description),
21 + h("dl",
22 +
23 + h("dt", "Creator"),
24 + h("dd", v.Creator),
25 +
26 + h("dt", "Identifier"),
27 + h("dd", v.Identifier),
28 +
29 + h("dt", "Published"),
30 + h("dd", v.Publicdate),
31 +
32 + h("dt", "Runtime"),
33 + h("dd", v.Runtime),
34 +
35 + h("dt", "Source"),
36 + h("dd", v.Source),
37 +
38 + h("dt", "License"),
39 + h("dd", h('a', { href : v.Licenseurl }, "Link"))))
40 + }
41 +}
package.jsonView
@@ -1,8 +1,8 @@
11 {
22 "name": "patchbay",
33 "description": "a pluggable patchwork",
4- "version": "6.1.12",
4 + "version": "6.1.13",
55 "homepage": "https://github.com/dominictarr/patchbay",
66 "repository": {
77 "type": "git",
88 "url": "git://github.com/dominictarr/patchbay.git"

Built with git-ssb-web