git ssb

2+

mixmix / ticktack



Commit 9fff2bb9c8cf22a5430644eaf74038867de5071d

Merge branch 'master' of github.com:ticktackim/ticktack-wp1 into blogShow

mix irving committed on 10/20/2017, 1:54:12 AM
Parent: 8cdccd655d04dc269300a1a05a44a64319b38607
Parent: b97fb441a1afa288d695acd468056c823a35bf00

Files changed

app/page/userShow.jschanged
app/page/userShow.mcsschanged
app/page/userShow.jsView
@@ -11,11 +11,10 @@
1111 'app.html.link': 'first',
1212 'app.html.blogCard': 'first',
1313 'contact.html.follow': 'first',
1414 'feed.pull.private': 'first',
15- 'feed.pull.rollup': 'first',
15+ 'sbot.pull.userFeed': 'first',
1616 'keys.sync.id': 'first',
17- 'state.obs.threads': 'first',
1817 'translations.sync.strings': 'first',
1918 })
2019
2120 exports.create = (api) => {
@@ -47,23 +46,17 @@
4746 const Link = api.app.html.link
4847 const userEditButton = Link({ page: 'userEdit', feed }, h('i.fa.fa-pencil'))
4948 const directMessageButton = Link({ page: 'threadNew', feed }, h('Button', strings.userShow.action.directMessage))
5049
51- const threads = MutantArray()
50+ const BLOG_TYPES = ['blog', 'post']
51+ const blogs = MutantArray()
5252 pull(
5353 // next(api.feed.pull.private, {reverse: true, limit: 100, live: false}, ['value', 'timestamp']),
5454 // api.feed.pull.private({reverse: true, limit: 100, live: false}),
55- api.feed.pull.private({reverse: true, live: false}),
56- pull.filter(msg => {
57- const recps = get(msg, 'value.content.recps')
58- if (!recps) return
59-
60- return recps
61- .map(r => typeof r === 'object' ? r.link : r)
62- .includes(feed)
63- }),
64- api.feed.pull.rollup(),
65- pull.drain(threads.push)
55+ api.sbot.pull.userFeed({id: feed, reverse: true, live: false}),
56+ pull.filter(msg => BLOG_TYPES.includes(get(msg, 'value.content.type'))),
57+ pull.filter(msg => get(msg, 'value.content.root') === undefined),
58+ pull.drain(blogs.push)
6659 // Scroller(content, scrollerContent, render, false, false)
6760 )
6861
6962 return h('Page -userShow', {title: name}, [
@@ -82,9 +75,9 @@
8275 h('div.directMessage', directMessageButton)
8376 ])
8477 : '',
8578 ]),
86- h('section.blogs', map(threads, api.app.html.blogCard))
79+ h('section.blogs', map(blogs, api.app.html.blogCard))
8780 ])
8881 ])
8982 }
9083 }
app/page/userShow.mcssView
@@ -33,10 +33,16 @@
3333 }
3434 }
3535
3636 section.blogs {
37+ div.BlogCard {
38+ margin-bottom: .5rem
39+
40+ div.context {
41+ div.Link { display: none }
42+ div.name { display: none }
43+ }
44+ }
3745 }
38-
39- div.threads {}
4046 }
4147 }
4248

Built with git-ssb-web