git ssb

3+

ev / decent



Commit 7b5e18d425db0a490c953d33d4d4f2a3bbeb28f9

load ssb-cap from config, fix network display, and remove plugins interface for now

Ev Bogue committed on 9/2/2017, 6:31:25 PM
Parent: dba1c7c8e80e8226b7e3aef504bbe3dc575c8ba3

Files changed

build/index.htmlchanged
client/modules/network.jschanged
decent.jschanged
lib/ssb-cap.jsdeleted
package.jsonchanged
yarn.lockchanged
build/index.htmlView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 1226544 bytes
New file size: 1226616 bytes
client/modules/network.jsView
@@ -97,44 +97,44 @@
9797 return setTimeout(poll, 1000)
9898
9999 api.sbot_gossip_peers(function (err, list) {
100100 if (list) {
101- ol.innerHTML = ''
102- list.sort(function (a, b) {
103- return (
104- (states[b.state] || 0) - (states[a.state] || 0)
105- || origin(b) - origin(a)
106- || types[getType(b)] - types[getType(a)]
107- || b.stateChange - a.stateChange
108- )
109- }).forEach(function (peer) {
110- ol.appendChild(h('div.message',
111- api.avatar(peer.key, 'thumbnail'),
112- h('div',
113- peer.state || 'not connected',
114- ' ',
115- getType(peer),
116- ' ',
117- (peer.ping && peer.ping.rtt) ? duration(peer.ping.rtt.mean) : '',
118- ' ',
119- (peer.ping && peer.ping.skew) ? duration(peer.ping.skew.mean) : '',
120- h('label',
121- {title: new Date(peer.stateChange).toString()},
122- peer.stateChange && ('(' + human(new Date(peer.stateChange))) + ')')
123- ),
124- 'source:'+peer.source,
125- h('pre', legacyToMultiServer(peer)),
126- h('button', 'connect', {onclick: function () {
127- api.sbot_gossip_connect(peer, function (err) {
128- if(err) console.error(err)
129- else console.log('connected to', peer)
130- })
131- }})
101 + ol.innerHTML = ''
102 + list.sort(function (a, b) {
103 + return (
104 + (states[b.state] || 0) - (states[a.state] || 0)
105 + || origin(b) - origin(a)
106 + || types[getType(b)] - types[getType(a)]
107 + || b.stateChange - a.stateChange
132108 )
133- )
134- })
135- setTimeout(poll, 1000)
136- }
109 + }).forEach(function (peer) {
110 + ol.appendChild(h('div.message',
111 + api.avatar(peer.key, 'thumbnail'),
112 + h('div',
113 + peer.state || 'not connected',
114 + ' ',
115 + getType(peer),
116 + ' ',
117 + (peer.ping && peer.ping.rtt) ? duration(peer.ping.rtt.mean) : '',
118 + ' ',
119 + (peer.ping && peer.ping.skew) ? duration(peer.ping.skew.mean) : '',
120 + h('label',
121 + {title: new Date(peer.stateChange).toString()},
122 + peer.stateChange && ('(' + human(new Date(peer.stateChange))) + ')')
123 + ),
124 + 'source:'+peer.source,
125 + h('pre', legacyToMultiServer(peer)),
126 + h('button', 'connect', {onclick: function () {
127 + api.sbot_gossip_connect(peer, function (err) {
128 + if(err) console.error(err)
129 + else console.log('connected to', peer)
130 + })
131 + }})
132 + )
133 + )
134 + })
135 + setTimeout(poll, 1000)
136 + }
137137 })
138138 })()
139139 return h('div.column.scroller', h('div.column.scroll-y', h('div.column.scroller__wrapper', ol)))
140140 }
decent.jsView
@@ -29,9 +29,8 @@
2929 // special server command:
3030 // import sbot and start the server
3131
3232 var createSbot = require('./lib')
33- .use(require('./plugins/plugins'))
3433 .use(require('./plugins/master'))
3534 .use(require('./plugins/gossip'))
3635 .use(require('./plugins/replicate'))
3736 .use(require('ssb-friends'))
@@ -45,9 +44,8 @@
4544 .use(require('./plugins/ssb-ws'))
4645 .use(require('ssb-ebt'))
4746
4847 // add third-party plugins
49- require('./plugins/plugins').loadUserPlugins(createSbot, config)
5048
5149 // start server
5250
5351 config.keys = keys
lib/ssb-cap.jsView
@@ -1,13 +1,0 @@
1-//this is the key for accessing the ssb protocol.
2-//this will be updated whenever breaking changes are made.
3-//(see secret-handshake paper for a full explaination)
4-module.exports =
5- new Buffer('EVRctE2Iv8GrO/BpQCF34e2FMPsDJot9x0j846LjVtc=', 'base64')
6-
7-//there is nothing special about this value.
8-//I generated it in the node repl with:
9-//
10-// > crypto.randomBytes(32).toString('base64')
11-//
12-//and copied it here.
13-
package.jsonView
@@ -68,8 +68,9 @@
6868 "pull-scroll": "^1.0.9",
6969 "pull-stream": "^3.4.5",
7070 "pull-stringify": "^2.0.0",
7171 "rc": "^1.2.1",
72 + "rimraf": "^2.4.2",
7273 "secret-stack": "^4.0.0",
7374 "secure-scuttlebutt": "^16.3.7",
7475 "simple-mime": "^0.1.0",
7576 "split-buffer": "^1.0.0",
yarn.lockView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 103109 bytes
New file size: 103124 bytes

Built with git-ssb-web