Commit 38e0417253d2dc77736737889d97f936df7f35a0
compose fixes, style fixes for threadShow
mix irving committed on 8/16/2017, 12:23:11 AMParent: 03dfe69caaa894d0106facac00e1c06356e78e05
Files changed
app/html/thread-card.js | changed |
app/html/thread.mcss | changed |
app/page/home.mcss | changed |
app/page/page.mcss | changed |
app/page/threadShow.js | changed |
message/html/compose.js | changed |
message/html/compose.mcss | changed |
styles/global.mcss | changed |
styles/mixins.js | changed |
app/html/thread-card.js | ||
---|---|---|
@@ -27,12 +27,12 @@ | ||
27 | 27 | const ellipsis = (sample.length < line.length) ? '...' : '' |
28 | 28 | return sample + ellipsis |
29 | 29 | } |
30 | 30 | |
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 | +// } | |
35 | 35 | |
36 | 36 | exports.create = function (api) { |
37 | 37 | |
38 | 38 | //render the icon for a thread. |
app/html/thread.mcss | ||
---|---|---|
@@ -28,9 +28,9 @@ | ||
28 | 28 | |
29 | 29 | div.msgs { |
30 | 30 | div.msg-row { |
31 | 31 | div.msg { |
32 | - border: 1.5px #ddd solid | |
32 | + border: 1px #ddd solid | |
33 | 33 | $roundRight |
34 | 34 | } |
35 | 35 | } |
36 | 36 | } |
@@ -56,8 +56,10 @@ | ||
56 | 56 | max-width: 80% |
57 | 57 | div.msg-row { |
58 | 58 | display: flex |
59 | 59 | |
60 | + margin-bottom: 3px | |
61 | + | |
60 | 62 | :first-child { |
61 | 63 | div.msg { $roundTop } |
62 | 64 | } |
63 | 65 | :last-child { |
@@ -67,13 +69,12 @@ | ||
67 | 69 | div.msg { |
68 | 70 | line-height: 1.2rem |
69 | 71 | background-color: #fff |
70 | 72 | padding: 0 .7rem |
71 | - margin-bottom: .1rem | |
72 | - border-radius: .3rem | |
73 | + border-radius: 4px | |
73 | 74 | } |
74 | - div.msg-spacer { | |
75 | - flex-grow: grow | |
75 | + div.spacer { | |
76 | + flex-grow: 1 | |
76 | 77 | } |
77 | 78 | } |
78 | 79 | } |
79 | 80 | } |
app/page/home.mcss | ||
---|---|---|
@@ -2,8 +2,9 @@ | ||
2 | 2 | |
3 | 3 | div.container { |
4 | 4 | $primaryBackground |
5 | 5 | |
6 | + | |
6 | 7 | section.updates { |
7 | 8 | |
8 | 9 | -directMessage { |
9 | 10 | $homePageSection |
@@ -52,8 +53,12 @@ | ||
52 | 53 | } |
53 | 54 | } |
54 | 55 | |
55 | 56 | $homePageSection { |
57 | + $maxWidth | |
58 | + margin-left: auto | |
59 | + margin-right: auto | |
60 | + | |
56 | 61 | display: flex |
57 | 62 | flex-direction: column |
58 | 63 | align-items: center |
59 | 64 | margin-bottom: 1.5rem |
app/page/page.mcss | ||
---|---|---|
@@ -8,9 +8,16 @@ | ||
8 | 8 | div.container { |
9 | 9 | $primaryBackground |
10 | 10 | padding: 1rem |
11 | 11 | |
12 | - max-width: 1400px | |
12 | + div.Thread { | |
13 | + $maxWidth | |
14 | + margin: 0 auto 1rem | |
15 | + } | |
13 | 16 | |
17 | + div.Compose { | |
18 | + $maxWidth | |
19 | + margin: 0 auto | |
20 | + } | |
14 | 21 | } |
15 | 22 | } |
16 | 23 |
app/page/threadShow.js | ||
---|---|---|
@@ -26,14 +26,16 @@ | ||
26 | 26 | branch: get(last(location.replies), 'key'), // >> lastId? CHECK THIS LOGIC |
27 | 27 | channel, |
28 | 28 | recps: get(location, 'value.content.recps') |
29 | 29 | } |
30 | - const composer = api.message.html.compose({ meta }) | |
30 | + const composer = api.message.html.compose({ meta, shrink: false }) | |
31 | 31 | |
32 | 32 | return h('Page -threadShow', [ |
33 | 33 | h('h1', 'Private message'), |
34 | 34 | api.app.html.nav(), |
35 | - h('div.container', thread), | |
36 | - composer | |
35 | + h('div.container', [ | |
36 | + thread, | |
37 | + composer | |
38 | + ]), | |
37 | 39 | ]) |
38 | 40 | } |
39 | 41 | } |
message/html/compose.js | ||
---|---|---|
@@ -173,9 +173,8 @@ | ||
173 | 173 | return api.message.async.publish(content, done) |
174 | 174 | // return api.message.html.confirm(content, done) |
175 | 175 | |
176 | 176 | function done (err, msg) { |
177 | - debugger | |
178 | 177 | publishBtn.disabled = false |
179 | 178 | if (err) throw err |
180 | 179 | else if (msg) textArea.value = '' |
181 | 180 | if (cb) cb(err, msg) |
message/html/compose.mcss | ||
---|---|---|
@@ -1,11 +1,12 @@ | ||
1 | 1 | Compose { |
2 | 2 | display: flex |
3 | 3 | flex-direction: column |
4 | 4 | |
5 | - padding: .5rem .5rem 1rem 6rem | |
5 | + textarea { | |
6 | + $basicText | |
6 | 7 | |
7 | - textarea { | |
8 | + padding: .6rem | |
8 | 9 | border: 1px solid gainsboro |
9 | 10 | border-top-left-radius: 0 |
10 | 11 | border-top-right-radius: 0 |
11 | 12 | } |
Built with git-ssb-web