Commit 7cc639e681c95348f2c8d6c526f1ee2aa40a5c4e
update patchcore, fix cryptixs like bug
mix irving committed on 4/5/2017, 10:15:05 PMParent: fa10ca34011578ba930c05f7c0cfb3fd1c465999
Files changed
message/html/confirm.js | changed |
message/html/confirm.mcss | changed |
message/html/layout/default.js | changed |
package.json | changed |
message/html/confirm.js | ||
---|---|---|
@@ -50,9 +50,9 @@ | ||
50 | 50 | }}, |
51 | 51 | 'cancel' |
52 | 52 | ) |
53 | 53 | |
54 | - okay.addEventListener('keydown', function (ev) { | |
54 | + okay.addEventListener('keydown', (ev) => { | |
55 | 55 | if (ev.keyCode === 27) cancel.click() // escape |
56 | 56 | }) |
57 | 57 | |
58 | 58 | lb.show(h('MessageConfirm', [ |
message/html/confirm.mcss | ||
---|---|---|
@@ -13,16 +13,14 @@ | ||
13 | 13 | header.author { |
14 | 14 | div { |
15 | 15 | section { |
16 | 16 | -timestamp { |
17 | - display: none | |
18 | 17 | } |
19 | 18 | } |
20 | 19 | } |
21 | 20 | } |
22 | 21 | |
23 | 22 | section.actions { |
24 | - visibility: hidden | |
25 | 23 | } |
26 | 24 | } |
27 | 25 | } |
28 | 26 |
message/html/layout/default.js | ||
---|---|---|
@@ -1,6 +1,7 @@ | ||
1 | -var nest = require('depnest') | |
1 | +const nest = require('depnest') | |
2 | 2 | const { h, Value } = require('mutant') |
3 | +const { isMsg } = require('ssb-ref') | |
3 | 4 | |
4 | 5 | exports.needs = nest({ |
5 | 6 | 'message.html': { |
6 | 7 | backlinks: 'first', |
@@ -19,24 +20,27 @@ | ||
19 | 20 | |
20 | 21 | function messageLayout (msg, opts) { |
21 | 22 | if (!(opts.layout === undefined || opts.layout === 'default')) return |
22 | 23 | |
24 | + var { author, timestamp, meta, action, backlinks } = api.message.html | |
25 | + if (!isMsg(msg)) action = () => {} | |
26 | + | |
23 | 27 | var rawMessage = Value(null) |
24 | 28 | |
25 | 29 | return h('Message', { |
26 | 30 | attributes: { |
27 | 31 | tabindex: '0' // needed to be able to navigate and show focus() |
28 | 32 | } |
29 | 33 | }, [ |
30 | 34 | h('section.avatar', {}, api.about.html.image(msg.value.author)), |
31 | - h('section.timestamp', {}, api.message.html.timestamp(msg)), | |
32 | - h('header.author', {}, api.message.html.author(msg)), | |
33 | - h('section.meta', {}, api.message.html.meta(msg, { rawMessage })), | |
35 | + h('section.timestamp', {}, timestamp(msg)), | |
36 | + h('header.author', {}, author(msg)), | |
37 | + h('section.meta', {}, meta(msg, { rawMessage })), | |
34 | 38 | h('section.title', {}, opts.title), |
35 | 39 | h('section.content', {}, opts.content), |
36 | 40 | h('section.raw-content', rawMessage), |
37 | - h('section.actions', {}, api.message.html.action(msg)), | |
38 | - h('footer.backlinks', {}, api.message.html.backlinks(msg)) | |
41 | + h('section.actions', {}, action(msg)), | |
42 | + h('footer.backlinks', {}, backlinks(msg)) | |
39 | 43 | ]) |
40 | 44 | } |
41 | 45 | } |
42 | 46 |
package.json | ||
---|---|---|
@@ -34,9 +34,9 @@ | ||
34 | 34 | "micro-css": "^1.0.0", |
35 | 35 | "mutant": "^3.16.0", |
36 | 36 | "mutant-pull-reduce": "^1.0.1", |
37 | 37 | "open-external": "^0.1.1", |
38 | - "patchcore": "^0.4.5", | |
38 | + "patchcore": "^0.4.8", | |
39 | 39 | "pull-cat": "^1.1.11", |
40 | 40 | "pull-next": "0.0.2", |
41 | 41 | "pull-scroll": "^1.0.3", |
42 | 42 | "pull-stream": "^3.5.0", |
Built with git-ssb-web