Browse Source

fixed avatar of add member autocomplete popup

Skylsmoi 6 years ago
parent
commit
c1612d91f4

+ 3 - 2
frontend/src/component/Dashboard/MemberList.jsx View File

1
 import React from 'react'
1
 import React from 'react'
2
 import PropTypes from 'prop-types'
2
 import PropTypes from 'prop-types'
3
 // import { Checkbox } from 'tracim_frontend_lib'
3
 // import { Checkbox } from 'tracim_frontend_lib'
4
+import { generateAvatarFromPublicName } from 'tracim_frontend_lib'
4
 
5
 
5
 require('./MemberList.styl')
6
 require('./MemberList.styl')
6
 
7
 
110
                             onClick={() => props.onClickKnownMember(u)}
111
                             onClick={() => props.onClickKnownMember(u)}
111
                             key={u.user_id}
112
                             key={u.user_id}
112
                           >
113
                           >
113
-                            <div className='autocomplete__item__avatar primaryColorBorder'>
114
-                              <img src={u.avatar_url} />
114
+                            <div className='autocomplete__item__avatar'>
115
+                              <img src={u.avatar_url ? u.avatar_url : generateAvatarFromPublicName(u.public_name)} />
115
                             </div>
116
                             </div>
116
 
117
 
117
                             <div className='autocomplete__item__name'>
118
                             <div className='autocomplete__item__name'>

+ 0 - 2
frontend/src/component/Dashboard/MemberList.styl View File

97
               width 45px
97
               width 45px
98
               height 45px
98
               height 45px
99
               border-radius 50%
99
               border-radius 50%
100
-              border-width 1px
101
-              border-style solid
102
             &__name
100
             &__name
103
               margin-left 15px
101
               margin-left 15px
104
       .name__input
102
       .name__input