git ssb

7+

dinoworm 🐛 / patchcore



Commit 428676644191b3fcf658e49167d835bb682488a2

standard check passes

Matt McKegg committed on 10/19/2017, 2:36:46 AM
Parent: cc390daa09626dec00f9649bd2685152e9466432

Files changed

contact/async.jschanged
contact/obs.jschanged
example/index.jschanged
message/async/name.jschanged
message/html/author.jschanged
message/html/layout/default.jschanged
message/html/layout/mini.jschanged
message/html/render/vote.jschanged
message/obs/likes.jschanged
contact/async.jsView
@@ -1,7 +1,5 @@
11 var nest = require('depnest')
2-var onceTrue = require('mutant/once-true')
3-var resolve = require('mutant/resolve')
42 var ref = require('ssb-ref')
53
64 exports.needs = nest({
75 'contact.obs.following': 'first',
@@ -57,5 +55,4 @@
5755 blocking: false
5856 }, cb)
5957 }
6058 }
61-
contact/obs.jsView
@@ -1,4 +1,6 @@
1 +'use strict'
2 +
13 var nest = require('depnest')
24 var { Value, computed } = require('mutant')
35 var pull = require('pull-stream')
46 var ref = require('ssb-ref')
@@ -71,17 +73,17 @@
7173 if (ref.isFeed(source)) {
7274 update(source, item[source], cache)
7375
7476 // generate reverse lookup
75- for (var dest in item[source]) {
77 + for (let dest in item[source]) {
7678 reverse[dest] = reverse[dest] || {}
7779 reverse[dest][source] = item[source][dest]
7880 }
7981 }
8082 }
8183
8284 // populate reverse observable cache
83- for (var dest in reverse) {
85 + for (let dest in reverse) {
8486 update(dest, reverse[dest], reverseCache)
8587 }
8688
8789 sync.set(true)
example/index.jsView
@@ -1,8 +1,9 @@
11 const combine = require('depject')
22 const apply = require('depject/apply')
33 const h = require('mutant/h')
44 const fs = require('fs')
5 +const Path = require('path')
56
67 const modules = require('../')
78 var api = entry(combine(modules))
89
@@ -12,9 +13,9 @@
1213 // public: 'first'
1314 // }
1415 // })()
1516
16-require('insert-css')(fs.readFileSync(__dirname + '/styles.css', 'utf8'))
17 +require('insert-css')(fs.readFileSync(Path.join(__dirname, 'styles.css'), 'utf8'))
1718
1819 var app = h('div.App', [
1920 api.feed.html.render(api.feed.pull.public)
2021 ])
message/async/name.jsView
@@ -49,10 +49,10 @@
4949 }
5050
5151 function titleFromMarkdown (text, max) {
5252 text = text.trim().split('\n', 3).join('\n')
53- text = text.replace(/_|`|\*|\#|^\[@.*?\]|\[|\]|\(\S*?\)/g, '').trim()
54- text = text.replace(/\:$/, '')
53 + text = text.replace(/_|`|\*|#|^\[@.*?]|\[|]|\(\S*?\)/g, '').trim()
54 + text = text.replace(/:$/, '')
5555 text = text.trim().split('\n', 1)[0].trim()
5656 if (text.length > max) {
5757 text = text.substring(0, max - 2) + '...'
5858 }
message/html/author.jsView
@@ -5,11 +5,11 @@
55
66 exports.gives = nest('message.html.author')
77
88 exports.create = function (api) {
9- return nest('message.html.author', message_author)
9 + return nest('message.html.author', messageAuthor)
1010
11- function message_author (msg) {
11 + function messageAuthor (msg) {
1212 return h('div', {title: msg.value.author}, [
1313 '@', api.about.obs.name(msg.value.author)
1414 ])
1515 }
message/html/layout/default.jsView
@@ -11,11 +11,11 @@
1111
1212 exports.gives = nest('message.html.layout')
1313
1414 exports.create = (api) => {
15- return nest('message.html.layout', message_layout)
15 + return nest('message.html.layout', messageLayout)
1616
17- function message_layout (msg, opts) {
17 + function messageLayout (msg, opts) {
1818 if (!(opts.layout === undefined || opts.layout === 'default')) return
1919 return h('div', {
2020 classList: 'Message'
2121 }, [
message/html/layout/mini.jsView
@@ -10,11 +10,11 @@
1010
1111 exports.gives = nest('message.html.layout')
1212
1313 exports.create = (api) => {
14- return nest('message.html.layout', message_layout)
14 + return nest('message.html.layout', messageLayout)
1515
16- function message_layout (msg, opts) {
16 + function messageLayout (msg, opts) {
1717 if (opts.layout !== 'mini') return
1818 return h('div', {
1919 classList: 'Message -mini'
2020 }, [
message/html/render/vote.jsView
@@ -1,5 +1,4 @@
1-var h = require('mutant/h')
21 var nest = require('depnest')
32 var extend = require('xtend')
43
54 exports.needs = nest({
message/obs/likes.jsView
@@ -1,9 +1,8 @@
11 var nest = require('depnest')
22 var ref = require('ssb-ref')
33 var MutantArray = require('mutant/array')
44 var concat = require('mutant/concat')
5-var watch = require('mutant/watch')
65
76 var { computed } = require('mutant')
87
98 exports.needs = nest({

Built with git-ssb-web