Commit 2e24392624c760f642aeacbb505728e0d85f2e34
disable likes + reply for message confirm preview
mix irving committed on 4/2/2017, 11:19:22 PMParent: b1d27bb56f4c964bcfc04597ab5026aaaa9b57d5
Files changed
message/html/confirm.mcss | changed |
message/html/meta/likes.js | changed |
message/html/confirm.mcss | ||
---|---|---|
@@ -19,10 +19,10 @@ | ||
19 | 19 | } |
20 | 20 | } |
21 | 21 | } |
22 | 22 | |
23 | - section.action { | |
24 | - display: none | |
23 | + section.actions { | |
24 | + visibility: hidden | |
25 | 25 | } |
26 | 26 | } |
27 | 27 | } |
28 | 28 |
message/html/meta/likes.js | ||
---|---|---|
@@ -1,6 +1,7 @@ | ||
1 | 1 | const nest = require('depnest') |
2 | 2 | const { h, computed, map } = require('mutant') |
3 | +const ref = require('ssb-ref') | |
3 | 4 | |
4 | 5 | exports.gives = nest('message.html.meta') |
5 | 6 | |
6 | 7 | exports.needs = nest({ |
@@ -11,8 +12,10 @@ | ||
11 | 12 | exports.create = (api) => { |
12 | 13 | return nest('message.html.meta', likes) |
13 | 14 | |
14 | 15 | function likes (msg) { |
16 | + if (!ref.isMsgId(msg.key)) return | |
17 | + | |
15 | 18 | const symbol = '\u2713' // tick 🗸 |
16 | 19 | |
17 | 20 | var likes = api.message.obs.likes(msg.key) |
18 | 21 |
Built with git-ssb-web