git ssb

2+

mixmix / ticktack



Commit 38e0417253d2dc77736737889d97f936df7f35a0

compose fixes, style fixes for threadShow

mix irving committed on 8/16/2017, 12:23:11 AM
Parent: 03dfe69caaa894d0106facac00e1c06356e78e05

Files changed

app/html/thread-card.jschanged
app/html/thread.mcsschanged
app/page/home.mcsschanged
app/page/page.mcsschanged
app/page/threadShow.jschanged
message/html/compose.jschanged
message/html/compose.mcsschanged
styles/global.mcsschanged
styles/mixins.jschanged
app/html/thread-card.jsView
@@ -27,12 +27,12 @@
2727 const ellipsis = (sample.length < line.length) ? '...' : ''
2828 return sample + ellipsis
2929 }
3030
31-function trimLeadingMentions (str) {
32- return str.replace(/^(\s*\[@[^\)]+\)\s*)*/, '')
33- // deletes any number of pattern " [@...) " from start of line
34-}
31+// function trimLeadingMentions (str) {
32+// return str.replace(/^(\s*\[@[^\)]+\)\s*)*/, '')
33+// // deletes any number of pattern " [@...) " from start of line
34+// }
3535
3636 exports.create = function (api) {
3737
3838 //render the icon for a thread.
app/html/thread.mcssView
@@ -28,9 +28,9 @@
2828
2929 div.msgs {
3030 div.msg-row {
3131 div.msg {
32- border: 1.5px #ddd solid
32+ border: 1px #ddd solid
3333 $roundRight
3434 }
3535 }
3636 }
@@ -56,8 +56,10 @@
5656 max-width: 80%
5757 div.msg-row {
5858 display: flex
5959
60+ margin-bottom: 3px
61+
6062 :first-child {
6163 div.msg { $roundTop }
6264 }
6365 :last-child {
@@ -67,13 +69,12 @@
6769 div.msg {
6870 line-height: 1.2rem
6971 background-color: #fff
7072 padding: 0 .7rem
71- margin-bottom: .1rem
72- border-radius: .3rem
73+ border-radius: 4px
7374 }
74- div.msg-spacer {
75- flex-grow: grow
75+ div.spacer {
76+ flex-grow: 1
7677 }
7778 }
7879 }
7980 }
app/page/home.mcssView
@@ -2,8 +2,9 @@
22
33 div.container {
44 $primaryBackground
55
6+
67 section.updates {
78
89 -directMessage {
910 $homePageSection
@@ -52,8 +53,12 @@
5253 }
5354 }
5455
5556 $homePageSection {
57+ $maxWidth
58+ margin-left: auto
59+ margin-right: auto
60+
5661 display: flex
5762 flex-direction: column
5863 align-items: center
5964 margin-bottom: 1.5rem
app/page/page.mcssView
@@ -8,9 +8,16 @@
88 div.container {
99 $primaryBackground
1010 padding: 1rem
1111
12- max-width: 1400px
12+ div.Thread {
13+ $maxWidth
14+ margin: 0 auto 1rem
15+ }
1316
17+ div.Compose {
18+ $maxWidth
19+ margin: 0 auto
20+ }
1421 }
1522 }
1623
app/page/threadShow.jsView
@@ -26,14 +26,16 @@
2626 branch: get(last(location.replies), 'key'), // >> lastId? CHECK THIS LOGIC
2727 channel,
2828 recps: get(location, 'value.content.recps')
2929 }
30- const composer = api.message.html.compose({ meta })
30+ const composer = api.message.html.compose({ meta, shrink: false })
3131
3232 return h('Page -threadShow', [
3333 h('h1', 'Private message'),
3434 api.app.html.nav(),
35- h('div.container', thread),
36- composer
35+ h('div.container', [
36+ thread,
37+ composer
38+ ]),
3739 ])
3840 }
3941 }
message/html/compose.jsView
@@ -173,9 +173,8 @@
173173 return api.message.async.publish(content, done)
174174 // return api.message.html.confirm(content, done)
175175
176176 function done (err, msg) {
177- debugger
178177 publishBtn.disabled = false
179178 if (err) throw err
180179 else if (msg) textArea.value = ''
181180 if (cb) cb(err, msg)
message/html/compose.mcssView
@@ -1,11 +1,12 @@
11 Compose {
22 display: flex
33 flex-direction: column
44
5- padding: .5rem .5rem 1rem 6rem
5+ textarea {
6+ $basicText
67
7- textarea {
8+ padding: .6rem
89 border: 1px solid gainsboro
910 border-top-left-radius: 0
1011 border-top-right-radius: 0
1112 }
styles/global.mcssView
@@ -1,6 +1,6 @@
11 body {
2- font-family: arial
2+ $basicText
33 background-color: #fff
44
55 margin: 0
66
@@ -19,8 +19,13 @@
1919 }
2020
2121 Markdown {
2222 word-break: break-word
23+
24+ (img) {
25+ margin: .5rem 0
26+ border-radius: .5rem
27+ }
2328 }
2429
2530 button {
2631 width: 100%
styles/mixins.jsView
@@ -9,8 +9,17 @@
99 })
1010 }
1111
1212 const mainMixins = `
13+$basicText {
14+ font-family: arial
15+ font-size: 1rem
16+}
17+
18+$maxWidth {
19+ max-width: 1200px
20+}
21+
1322 $primaryColor {
1423 color: white
1524 background-color: #3dc8c3
1625 }

Built with git-ssb-web