git ssb

16+

Dominic / patchbay



Commit 87e8dd5ccef51221cc20ce6c491bfcb4d106f63b

remove a bunch of unused constants (thanks standard!)

mix irving committed on 1/16/2017, 8:52:59 AM
Parent: 010c28ba45ecc8a029b813a3cd9e7edc8e098059

Files changed

modules_basic/avatar-edit.jschanged
modules_basic/avatar-image.jschanged
modules_basic/avatar.jschanged
modules_basic/compose.jschanged
modules_basic/follow.jschanged
modules_basic/like.jschanged
modules_basic/message.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/app.jschanged
modules_core/file-input.jschanged
modules_core/message-confirm.jschanged
modules_core/styles.jschanged
modules_core/tabs.jschanged
modules_extra/channel.jschanged
modules_extra/key.jschanged
modules_extra/meta-image.jschanged
modules_extra/raw.jschanged
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,14 +14,8 @@
1714 exports.gives = {
1815 connection_status: true, avatar_image: true
1916 }
2017
21-
22-function isFunction (f) {
23- return 'function' === typeof f
24-}
25-
26-
2718 var ready = false
2819 var waiting = []
2920
3021 var last = 0
modules_basic/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/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
modules_basic/follow.jsView
@@ -1,7 +1,5 @@
11 var h = require('hyperscript')
2-var u = require('../util')
3-var pull = require('pull-stream')
42
53 //render a message when someone follows someone,
64 //so you see new users
75 function isRelated(value, name) {
modules_basic/like.jsView
@@ -1,6 +1,5 @@
11 var h = require('hyperscript')
2-var u = require('../util')
32 var pull = require('pull-stream')
43
54 exports.needs = {
65 avatar_name: 'first',
modules_basic/message.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/app.jsView
@@ -23,9 +23,8 @@
2323 function hash() {
2424 return window.location.hash.substring(1)
2525 }
2626
27- console.log(hash() || 'tabs')
2827 var view = api.screen_view(hash() || 'tabs')
2928
3029 var screen = h('div.screen.column', view)
3130
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/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) {
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/key.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 exports.gives = {
74 menu_items: true, screen_view: true
85 }
@@ -16,10 +13,10 @@
1613 if(path === '/key') {
1714 if(process.title === 'browser') {
1815 var importKey = h('textarea', {placeholder: 'import an existing public/private key', name: 'textarea'})
1916 var importRemote = h('textarea', {placeholder: 'import an existing remote', name: 'textarea'})
20- var content = h('div.column.scroller__content')
21- var div = h('div.column.scroller',
17 +
18 + return h('div.column.scroller',
2219 {style: {'overflow':'auto'}},
2320 h('div.scroller__wrapper',
2421 h('div.column.scroller__content',
2522 h('div.message',
@@ -44,9 +41,8 @@
4441 )
4542 )
4643 )
4744 )
48- return div
4945 } else {
5046 return h('p', 'Your key is saved at .ssb/secret')
5147 }
5248 }
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

Built with git-ssb-web