git ssb

2+

mixmix / ticktack



Tree: ef08c9119e733198510e57b49ae441a7d0c8cae7

Files: ef08c9119e733198510e57b49ae441a7d0c8cae7 / main.js

1253 bytesRaw
1const combine = require('depject')
2const entry = require('depject/entry')
3const nest = require('depnest')
4
5// polyfills
6require('setimmediate')
7
8// add inspect right click menu
9require('./context-menu')
10
11// from more specialized to more general
12const sockets = combine(
13 require('patch-settings'),
14 //we always need to have translations first!
15 { translations: require('./translations/sync') },
16 {
17 about: require('./about'),
18 app: require('./app'),
19 blob: require('./blob'),
20 channel: require('./channel'),
21 //config: require('./ssb-config'),
22 config: require('./config'),
23 // group: require('./group'),
24 message: require('./message'),
25 router: require('./router'),
26 styles: require('./styles'),
27 state: require('./state/obs'),
28 unread: require('./unread'),
29 },
30 require('patch-profile'),
31 require('patchcore')
32)
33
34const api = entry(sockets, nest({
35 'app.html.app': 'first',
36 'invite.async.autofollow': 'first',
37 'config.sync.load': 'first'
38}))
39
40document.body.appendChild(api.app.html.app())
41
42var invite = api.config.sync.load().autoinvite
43if(invite)
44 api.invite.async.autofollow(
45 invite,
46 function (err, follows) {
47 console.log('autofollowed', err, follows);
48 })
49else
50 console.log('no invite')
51

Built with git-ssb-web