git ssb

2+

mixmix / ticktack



Commit 09b5f547eae3101aadd573367a0f734ce0caf87c

working nested comments in notifications

mix irving committed on 5/7/2018, 5:23:01 AM
Parent: 87dd7388171016a3b49fb155c4b07fd06b4c5436

Files changed

app/page/notifications.mcsschanged
message/html/comment.jschanged
message/html/comment.mcsschanged
app/page/notifications.mcssView
@@ -1,11 +1,21 @@
11 Page -notifications {
22 div.Scroller.content {
33
44 section.content {
5+ padding-top: 2rem
6+
57 div.Comment {
68 flex-grow: 1
79
10+ div.right {
11+ section.replies {
12+
13+ div.Comment.-nested {
14+ $backgroundPrimary
15+ }
16+ }
17+ }
818 }
919 }
1020 }
1121 }
message/html/comment.jsView
@@ -33,10 +33,10 @@
3333
3434 if (!replies) {
3535 replies = computed(api.backlinks.obs.for(msg.key), backlinks => {
3636 return backlinks.filter(backlinker => {
37- const { type, root } = backlinker.value.content
38- return type === 'post' && root === msg.key
37+ const { type, root: _root, fork } = backlinker.value.content
38+ return type === 'post' && fork === msg.key && _root === root
3939 })
4040 })
4141 }
4242 if (!branch) {
@@ -81,8 +81,14 @@
8181 when(showRootLink, h('a.rootLink', {href: root}, ['<< ', title, ' >>']))
8282 // TODO don't link to root, link to position of message within blog!
8383 ]),
8484 h('section.content', api.message.html.markdown(get(msg, 'value.content.text'))),
85+ h('section.actions', [
86+ h('div.reply', { 'ev-click': toggleCompose }, [
87+ h('i.fa.fa-commenting-o')
88+ ]),
89+ api.message.html.likes(msg)
90+ ]),
8591 when(replies,
8692 h('section.replies',
8793 map(
8894 replies,
@@ -95,14 +101,8 @@
95101 }
96102 )
97103 )
98104 ),
99- h('section.actions', [
100- h('div.reply', { 'ev-click': toggleCompose }, [
101- h('i.fa.fa-commenting-o')
102- ]),
103- api.message.html.likes(msg)
104- ]),
105105 when(nestedReplyCompose, nestedReplyComposer)
106106 ])
107107 ])
108108 }
message/html/comment.mcssView
@@ -54,8 +54,12 @@
5454
5555 div.Likes { }
5656 }
5757
58+ section.replies {
59+ margin-top: 1rem
60+ }
61+
5862 div.Compose {
5963 margin: 1rem 0
6064 }
6165 }

Built with git-ssb-web