Commit e3efce5ef814291ba8bc43f7ffe6b7348feee531
Merge branch 'master' into fix-emoji-size
mix irving committed on 5/16/2017, 5:46:06 AMParent: 8ba14ee45feb74b60293b50fd0c6af96edfa2ec9
Parent: 2a429433c0a7938918ac401bede1bf26762b197a
Files changed
README.md | changed |
app/html/app.js | changed |
app/html/hypertabs.mcss | changed |
app/html/page/thread.js | changed |
main.js | changed |
message/html/render/about.js | changed |
package.json | changed |
.babelrc | added |
README.md | ||
---|---|---|
@@ -59,9 +59,9 @@ | ||
59 | 59 … | |
60 | 60 … | From inside the patchbay repo folder, |
61 | 61 … | |
62 | 62 … | ```sh |
63 | -npm install -g electron electro | |
63 … | +npm install -g electron electro font-awesome | |
64 | 64 … | npm run rebuild |
65 | 65 … | npm start |
66 | 66 … | ``` |
67 | 67 … |
app/html/app.js | ||
---|---|---|
@@ -15,8 +15,9 @@ | ||
15 | 15 … | tabs: 'first', |
16 | 16 … | page: 'first' |
17 | 17 … | }, |
18 | 18 … | sync: { |
19 … | + window: 'reduce', | |
19 | 20 … | addPage: 'first', |
20 | 21 … | catchKeyboardShortcut: 'first' |
21 | 22 … | } |
22 | 23 … | }, |
@@ -26,8 +27,9 @@ | ||
26 | 27 … | exports.create = function (api) { |
27 | 28 … | return nest('app.html.app', app) |
28 | 29 … | |
29 | 30 … | function app () { |
31 … | + window = api.app.sync.window(window) | |
30 | 32 … | const css = values(api.styles.css()).join('\n') |
31 | 33 … | insertCss(css) |
32 | 34 … | |
33 | 35 … | const initialTabs = ['/public', '/private', '/notifications'] |
@@ -67,4 +69,5 @@ | ||
67 | 69 … | const keys = Object.keys(object) |
68 | 70 … | return keys.map(k => object[k]) |
69 | 71 … | } |
70 | 72 … | |
73 … | + |
app/html/hypertabs.mcss | ||
---|---|---|
@@ -30,8 +30,14 @@ | ||
30 | 30 … | margin-left: .6rem |
31 | 31 … | border: 1px gainsboro solid |
32 | 32 … | border-bottom: none |
33 | 33 … | |
34 … | + :hover { | |
35 … | + a.close { | |
36 … | + visibility: visible | |
37 … | + } | |
38 … | + } | |
39 … | + | |
34 | 40 … | -selected { |
35 | 41 … | color: #222 |
36 | 42 … | background-color: #fff |
37 | 43 … |
app/html/page/thread.js | ||
---|---|---|
@@ -68,9 +68,9 @@ | ||
68 | 68 … | placeholder: 'Write a reply', |
69 | 69 … | shrink: false |
70 | 70 … | }) |
71 | 71 … | const content = h('section.content', map(messages, m => { |
72 | - return api.message.html.render(resolve(m)) | |
72 … | + return api.message.html.render(resolve(m), {pageId: id}) | |
73 | 73 … | })) |
74 | 74 … | const { container } = api.app.html.scroller({ prepend: header, content, append: composer }) |
75 | 75 … | |
76 | 76 … | container.classList.add('Thread') |
main.js | ||
---|---|---|
@@ -1,19 +1,25 @@ | ||
1 | 1 … | const combine = require('depject') |
2 | 2 … | const entry = require('depject/entry') |
3 | 3 … | const nest = require('depnest') |
4 | 4 … | |
5 … | +const context = require('patch-context') | |
5 | 6 … | const git = require('patch-git') |
6 | 7 … | const horcrux = require('ssb-horcrux') |
8 … | +const gatherings = require('patch-gatherings') | |
9 … | +const bayGatherings = require('patchbay-gatherings') | |
7 | 10 … | const patchbay = require('./') |
8 | 11 … | const patchcore = require('patchcore') |
9 | 12 … | |
10 | 13 … | // polyfills |
11 | 14 … | require('setimmediate') |
12 | 15 … | |
13 | 16 … | // from more specialized to more general |
14 | 17 … | const sockets = combine( |
18 … | + context, | |
15 | 19 … | git, |
20 … | + bayGatherings, //adds menu items | |
21 … | + gatherings, | |
16 | 22 … | horcrux, |
17 | 23 … | patchbay, |
18 | 24 … | patchcore |
19 | 25 … | ) |
message/html/render/about.js | ||
---|---|---|
@@ -19,8 +19,11 @@ | ||
19 | 19 … | |
20 | 20 … | function about (msg, opts) { |
21 | 21 … | if (msg.value.content.type !== 'about') return |
22 | 22 … | |
23 … | + const { name, description, image } = msg.value.content | |
24 … | + if (!name && !description && !image) return | |
25 … | + | |
23 | 26 … | const element = api.message.html.layout(msg, extend({ |
24 | 27 … | content: renderContent(msg), |
25 | 28 … | layout: 'default' |
26 | 29 … | }, opts)) |
@@ -35,14 +38,20 @@ | ||
35 | 38 … | // TODO : build better normalizers |
36 | 39 … | if (image && ref.isBlob(image.link)) image = image.link |
37 | 40 … | about = about || link |
38 | 41 … | |
42 … | + const metaData = [ | |
43 … | + when(name, h('div', [ h('strong', 'Name: '), name ])), | |
44 … | + when(description, h('div', [ h('strong', 'Description: '), description ])), | |
45 … | + when(image, h('img', { src: api.blob.sync.url(image) })) | |
46 … | + ] | |
47 … | + | |
39 | 48 … | if (!ref.isFeed(about)) { |
40 | 49 … | return [ |
41 | 50 … | 'Describes ', |
42 | 51 … | h('a', { href: about }, [about.slice(0, 7), '...']), |
43 | 52 … | ' as: ', |
44 | - name | |
53 … | + ...metaData | |
45 | 54 … | ] |
46 | 55 … | } |
47 | 56 … | |
48 | 57 … | const target = author === about |
@@ -50,11 +59,9 @@ | ||
50 | 59 … | : api.about.html.link(about) |
51 | 60 … | |
52 | 61 … | return [ |
53 | 62 … | 'Declares the following about ', target, |
54 | - when(name, h('div', [ h('strong', 'Name: '), name ])), | |
55 | - when(description, h('div', [ h('strong', 'Description: '), description ])), | |
56 | - when(image, h('img', { src: api.blob.sync.url(image) })) | |
63 … | + ...metaData | |
57 | 64 … | ] |
58 | 65 … | } |
59 | 66 … | } |
60 | 67 … |
package.json | |||
---|---|---|---|
@@ -1,7 +1,7 @@ | |||
1 | 1 … | { | |
2 | 2 … | "name": "patchbay", | |
3 | - "version": "7.5.2", | ||
3 … | + "version": "7.6.0", | ||
4 | 4 … | "description": "patchbay 2, built on patchcore", | |
5 | 5 … | "main": "index.js", | |
6 | 6 … | "scripts": { | |
7 | 7 … | "lint": "standard", | |
@@ -45,12 +45,15 @@ | |||
45 | 45 … | "hypertabs": "^4.2.0", | |
46 | 46 … | "insert-css": "^2.0.0", | |
47 | 47 … | "libnested": "^1.2.1", | |
48 | 48 … | "micro-css": "^1.0.0", | |
49 | - "mutant": "^3.16.0", | ||
49 … | + "mutant": "^3.18.0", | ||
50 | 50 … | "mutant-pull-reduce": "^1.0.1", | |
51 | 51 … | "open-external": "^0.1.1", | |
52 … | + "patch-context": "^2.0.0", | ||
53 … | + "patch-gatherings": "^2.3.0", | ||
52 | 54 … | "patch-git": "0.1.0", | |
55 … | + "patchbay-gatherings": "^1.1.0", | ||
53 | 56 … | "patchcore": "^0.5.0", | |
54 | 57 … | "pull-abortable": "^4.1.1", | |
55 | 58 … | "pull-cat": "^1.1.11", | |
56 | 59 … | "pull-next": "1.0.0", |
Built with git-ssb-web