Commit 5e49975bd655888b5d5e8e4bc2d699a35e99061e
Merge branch 'master' into ssb-server-14
mixmix committed on 1/28/2019, 1:30:04 AMParent: ec42a491d34579d6de754135827e8046751f292f
Parent: 9b4e198358bf6c129b0edc937c79ca5733c84a9a
Files changed
app/page/posts.mcss | changed |
config.js | changed |
package-lock.json | changed |
package.json | changed |
app/page/posts.mcss | ||
---|---|---|
@@ -121,8 +121,11 @@ | ||
121 | 121 … | p { |
122 | 122 … | :first-of-type { margin-top: 0 } |
123 | 123 … | } |
124 | 124 … | (img) { max-width: 100% } |
125 … | + (pre) { background-color: #000; } | |
126 … | + (code) { background-color: #000; } | |
127 … | + (a) { color: #db67ed } | |
125 | 128 … | } |
126 | 129 … | } |
127 | 130 … | |
128 | 131 … | div.recent { |
config.js | ||
---|---|---|
@@ -2,42 +2,44 @@ | ||
2 | 2 … | const Config = require('ssb-config/inject') |
3 | 3 … | const Path = require('path') |
4 | 4 … | const merge = require('lodash/merge') |
5 | 5 … | |
6 | -const appName = process.env.ssb_appname || 'ssb' | |
7 | -const opts = appName === 'ssb' ? null : null | |
8 | - | |
9 | 6 … | exports.gives = nest('config.sync.load') |
10 | 7 … | exports.create = (api) => { |
11 | 8 … | var config |
12 | 9 … | return nest('config.sync.load', () => { |
13 | 10 … | if (config) return config |
14 | 11 … | |
15 | 12 … | console.log('LOADING config') |
16 | - config = Config(appName, opts) | |
13 … | + config = Config(process.env.ssb_appname || 'ssb') | |
17 | 14 … | |
18 | - config = merge( | |
19 | - config, | |
20 | - Connections(config), | |
21 | - Remote(config) | |
22 | - ) | |
15 … | + config = addSockets(config) | |
16 … | + config = fixLocalhost(config) | |
23 | 17 … | |
24 | 18 … | return config |
25 | 19 … | }) |
26 | 20 … | } |
27 | 21 … | |
28 | -function Connections (config) { | |
29 | - const connections = (process.platform === 'win32') | |
30 | - ? undefined | |
31 | - : { incoming: { unix: [{ scope: 'local', transform: 'noauth', server: true }] } } | |
22 … | +function addSockets (config) { | |
23 … | + if (process.platform === 'win32') return config | |
32 | 24 … | |
33 | - return connections ? { connections } : {} | |
25 … | + const pubkey = config.keys.id.slice(1).replace(`.${config.keys.curve}`, '') | |
26 … | + return merge( | |
27 … | + config, | |
28 … | + { | |
29 … | + connections: { | |
30 … | + incoming: { unix: [{ scope: 'local', transform: 'noauth', server: true }] } | |
31 … | + }, | |
32 … | + remote: `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}` // overwrites | |
33 … | + } | |
34 … | + ) | |
34 | 35 … | } |
35 | 36 … | |
36 | -function Remote (config) { | |
37 | - const pubkey = config.keys.id.slice(1).replace(`.${config.keys.curve}`, '') | |
38 | - const remote = (process.platform === 'win32') | |
39 | - ? undefined // `net:127.0.0.1:${config.port}~shs:${pubkey}` // currently broken | |
40 | - : `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}` | |
37 … | +function fixLocalhost (config) { | |
38 … | + if (process.platform !== 'win32') return config | |
41 | 39 … | |
42 | - return remote ? { remote } : {} | |
40 … | + // without this host defaults to :: which doesn't work on windows 10? | |
41 … | + config.connections.incoming.net[0].host = '127.0.0.1' | |
42 … | + config.connections.incoming.ws[0].host = '127.0.0.1' | |
43 … | + config.host = '127.0.0.1' | |
44 … | + return config | |
43 | 45 … | } |
package-lock.json | ||
---|---|---|
The diff is too large to show. Use a local git client to view these changes. Old file size: 587807 bytes New file size: 587807 bytes |
package.json | ||
---|---|---|
@@ -72,12 +72,12 @@ | ||
72 | 72 … | "patch-settings": "^1.1.2", |
73 | 73 … | "patch-suggest": "^3.0.1", |
74 | 74 … | "patchbay-book": "^1.0.8", |
75 | 75 … | "patchbay-dark-crystal": "^2.0.0", |
76 | - "patchbay-gatherings": "^3.2.8", | |
77 | - "patchbay-poll": "^1.1.3", | |
78 | - "patchbay-scry": "^1.3.4", | |
79 | - "patchcore": "^2.1.3", | |
76 … | + "patchbay-gatherings": "^3.2.9", | |
77 … | + "patchbay-poll": "^1.1.4", | |
78 … | + "patchbay-scry": "^1.5.0", | |
79 … | + "patchcore": "^2.1.4", | |
80 | 80 … | "pull-abortable": "^4.1.1", |
81 | 81 … | "pull-next-query": "^1.0.0", |
82 | 82 … | "pull-notify": "^0.1.1", |
83 | 83 … | "pull-scroll": "^1.0.9", |
Built with git-ssb-web