git ssb

2+

mixmix / ticktack



Commit 28b7b3ffa2424be2e5cc492462af04c6e83aec64

multi-pm sidebar: minimal styling

mix committed on 2/11/2018, 3:47:03 AM
Parent: f83096c56f189c3905e5dea631e25ded0440e6aa

Files changed

about/html/avatar.mcsschanged
app/html/sideNav/sideNav.mcsschanged
app/html/sideNav/sideNavDiscovery.jschanged
app/page/userShow.jschanged
styles/mixins.jschanged
about/html/avatar.mcssView
@@ -5,8 +5,12 @@
55 -tiny {
66 $circleTiny
77 }
88
9+ -halfSmall {
10+ $circleHalfSmall
11+ }
12+
913 -small {
1014 $circleSmall
1115 }
1216
app/html/sideNav/sideNav.mcssView
@@ -92,13 +92,17 @@
9292 justify-content: center
9393 align-items: center
9494 }
9595
96+ img {}
97+ div.many-images {
98+ display: flex
99+ flex-wrap: wrap
100+
101+ img {
102+ }
103+ }
96104
97- a img {
98-
99- }
100-
101105 i {
102106 $circleSmall
103107 $colorPrimary
104108 font-size: 1.3rem
app/html/sideNav/sideNavDiscovery.jsView
@@ -184,9 +184,9 @@
184184 else {
185185 return Option({
186186 //the number of threads with each peer
187187 notifications: notifications(participants),
188- imageEl: participants.map(p => api.about.html.avatar(p)),
188+ imageEl: participants.map(p => api.about.html.avatar(p, 'halfSmall')),
189189 label: getSubject(msg),
190190 selected: locParticipantsKey === participants.key,
191191 location: Object.assign({}, msg, { participants }) // TODO make obs?
192192 })
@@ -325,9 +325,11 @@
325325
326326 return h('Option', { className }, [
327327 h('div.circle', [
328328 when(notifications, h('div.alert', notifications)),
329- imageEl
329+ Array.isArray(imageEl)
330+ ? h('div.many-images', imageEl.slice(0,4)) // not ideal? not enough space to show more though
331+ : imageEl
330332 ]),
331333 h('div.label', { 'ev-click': goToLocation }, label)
332334 ])
333335 }
app/page/userShow.jsView
@@ -41,9 +41,9 @@
4141 { page: 'userEdit', feed },
4242 // h('i.fa.fa-pencil')
4343 h('img', { src: path.join(__dirname, '../../assets', 'edit.png') })
4444 )
45- const directMessageButton = Link({ page: 'threadNew', feed }, h('Button', strings.userShow.action.directMessage))
45+ const directMessageButton = Link({ page: 'threadNew', participants: [feed] }, h('Button', strings.userShow.action.directMessage))
4646
4747 const BLOG_TYPES = ['blog', 'post']
4848
4949 // TODO return some of this ?
styles/mixins.jsView
@@ -83,8 +83,15 @@
8383 width: 2.8rem
8484 height: 2.8rem
8585 border-radius: 4rem
8686 }
87+$circleHalfSmall {
88+ min-width: 1.4rem
89+ min-height: 1.4rem
90+ width: 1.4rem
91+ height: 1.4rem
92+ border-radius: 2rem
93+}
8794
8895 $circleMedium {
8996 min-width: 3.5rem
9097 min-height: 3.5rem

Built with git-ssb-web