git ssb

16+

Dominic / patchbay



Commit 90fd465da992b9a0c6ce19b5cbd52d9eff064bd3

Merge branch 'compact'

Dominic Tarr committed on 10/26/2016, 3:44:23 PM
Parent: 96310c904c89535e9578346eb2306036f0ea85c4
Parent: bc807ef7bb9327316c4fba7c60dc237ba3879140

Files changed

modules/message.jschanged
modules/theme.jschanged
modules/timestamp.jschanged
style.csschanged
modules/message.jsView
@@ -16,13 +16,14 @@
1616
1717 exports.message_render = function (msg, sbot) {
1818 var elMini = message_content_mini(msg)
1919 if (elMini) {
20- var div = h('div.message',
21- h('div.message_content.row',
20 + var div = h('div.message.message--mini',
21 + h('div.row',
2222 h('div',
2323 avatar_link(msg.value.author, avatar_name(msg.value.author), ''),
24- ' ', elMini),
24 + ' ',
25 + h('span.message_content', elMini)),
2526 h('div.message_meta.row', message_meta(msg))
2627 )
2728 )
2829 div.setAttribute('tabindex', '0')
modules/theme.jsView
@@ -29,9 +29,10 @@
2929 })
3030 }
3131
3232 function useSavedTheme() {
33- useTheme(localStorage.themeId || defaultTheme.id)
33 + //enable setting "NONE" as your theme, and having that persist.
34 + useTheme(localStorage.themeId == null ? defaultTheme.id : localStorage.themeId)
3435 }
3536
3637 next(useSavedTheme)
3738
modules/timestamp.jsView
@@ -1,7 +1,12 @@
11 var h = require('hyperscript')
2-var human = require('human-time')
2 +var _human = require('human-time')
33
4 +function human (date) {
5 + var s =_human(date).split(' ')
6 + return s[0] + (s[1] == 'month' ? 'M' : s[1][0])
7 +}
8 +
49 function updateTimestampEl(el) {
510 el.firstChild.nodeValue = human(new Date(el.timestamp))
611 return el
712 }
@@ -11,11 +16,14 @@
1116 els.forEach(updateTimestampEl)
1217 }, 60e3)
1318
1419 exports.message_meta = function (msg) {
20 + var d = new Date(msg.value.timestamp)
1521 return updateTimestampEl(h('a.enter.timestamp', {
1622 href: '#'+msg.key,
1723 timestamp: msg.value.timestamp,
18- title: new Date(msg.value.timestamp)
24 + title: _human(d) + '\n'+d
1925 }, ''))
2026 }
2127
28 +
29 +
style.cssView
@@ -163,25 +163,36 @@
163163
164164 /* messages */
165165
166166 .message {
167- display: block;
168- flex-basis: 0;
169167 word-wrap: break-word;
170- display: inline-block;
171168 margin-bottom: 1em;
172169 padding: 0.3rem;
173170 border-radius: 2px;
174171 box-shadow: #dadada 1px 2px 8px;
172 + background: white;
175173 }
176174
175 +.message--mini {
176 + margin-bottom: 1em;
177 + padding: ;
178 + border-radius: 0;
179 + box-shadow: none;
180 + background: inherit;
181 +}
182 +
177183 .message_content div > span {
178184 font-size: 0.8rem;
179185 margin-bottom: 0.7rem;
180186 display: block;
181187 color: #888;
182188 }
183189
190 +.message_content--mini div > span {
191 + display: inline-block;
192 +}
193 +
194 +
184195 .message_content div > span a {
185196 color: #005d8c;
186197 }
187198
@@ -210,8 +221,16 @@
210221 .message img {
211222 max-width: 100%;
212223 }
213224
225 +.message > .title > .avatar {
226 + margin-left: 0;
227 +}
228 +
229 +.message_content {
230 + padding: .5ex;
231 +}
232 +
214233 .actions > * {
215234 padding-left: 5px;
216235 margin-left: 1px;
217236 }
@@ -220,16 +239,9 @@
220239 border-right: 2px solid #eee;
221240 padding-right: 5px;
222241 }
223242
224-.message > .title > .avatar {
225- margin-left: 0;
226-}
227243
228-.message_content {
229- padding: .5ex;
230-}
231-
232244 /* -- suggest box */
233245
234246 .suggest-box > * {
235247 display: block;
@@ -257,13 +269,8 @@
257269 .avatar--fullsize {
258270 border: 1px solid #eee;
259271 }
260272
261-.avatar {
262- display: flex;
263- flex-direction: row;
264-}
265-
266273 .avatar--large {
267274 width: 10em;
268275 height: 10em;
269276 }
@@ -437,6 +444,7 @@
437444 .hypertabs--selected .hypertabs__x {
438445 display: block;
439446 }
440447
441-
442-
448 +.screen {
449 + background: #f5f5f5
450 +}

Built with git-ssb-web