git ssb

7+

dinoworm 🐛 / patchcore



Commit e39517ed16b6fa5885cb75ea45fd8d8ddc9e4d5e

rename 'zz_fallback' to 'zzz-fallback'

Matt McKegg committed on 2/17/2017, 1:10:39 PM
Parent: 0cf9452d70be8af1d22ef550fc9602276f10334d

Files changed

message/html/render/zz_fallback.jsdeleted
message/html/render/zzz-fallback.jsadded
message/html/render/zz_fallback.jsView
@@ -1,33 +1,0 @@
1-var h = require('mutant/h')
2-var nest = require('depnest')
3-var extend = require('xtend')
4-
5-exports.needs = nest({
6- 'message.html': {
7- decorate: 'reduce',
8- layout: 'first'
9- }
10-})
11-
12-exports.gives = nest('message.html.render')
13-
14-exports.create = function (api) {
15- return nest('message.html.render', renderMessage)
16-
17- function renderMessage (msg, opts) {
18- var element = api.message.html.layout(msg, extend({
19- content: renderContent(msg),
20- layout: 'mini'
21- }, opts))
22-
23- return api.message.html.decorate(element, { msg })
24- }
25-
26- function renderContent (msg) {
27- if (typeof msg.value.content === 'string') {
28- return h('code', {}, 'PRIVATE')
29- } else {
30- return h('code', {}, msg.value.content.type)
31- }
32- }
33-}
message/html/render/zzz-fallback.jsView
@@ -1,0 +1,33 @@
1 +var h = require('mutant/h')
2 +var nest = require('depnest')
3 +var extend = require('xtend')
4 +
5 +exports.needs = nest({
6 + 'message.html': {
7 + decorate: 'reduce',
8 + layout: 'first'
9 + }
10 +})
11 +
12 +exports.gives = nest('message.html.render')
13 +
14 +exports.create = function (api) {
15 + return nest('message.html.render', renderMessage)
16 +
17 + function renderMessage (msg, opts) {
18 + var element = api.message.html.layout(msg, extend({
19 + content: renderContent(msg),
20 + layout: 'mini'
21 + }, opts))
22 +
23 + return api.message.html.decorate(element, { msg })
24 + }
25 +
26 + function renderContent (msg) {
27 + if (typeof msg.value.content === 'string') {
28 + return h('code', {}, 'PRIVATE')
29 + } else {
30 + return h('code', {}, msg.value.content.type)
31 + }
32 + }
33 +}

Built with git-ssb-web