Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-jams
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-jams
Commits
ec5f9082
Commit
ec5f9082
authored
4 years ago
by
Larbi Gharib
Browse files
Options
Downloads
Patches
Plain Diff
Fix display user avatar
Change-Id: Ie1fe935ce317acf18aeb6ad859637aafb11715f2
parent
3c269261
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
jams-react-client/src/views/UserProfile/DisplayUserProfile.js
+35
-48
35 additions, 48 deletions
...-react-client/src/views/UserProfile/DisplayUserProfile.js
with
35 additions
and
48 deletions
jams-react-client/src/views/UserProfile/DisplayUserProfile.js
+
35
−
48
View file @
ec5f9082
...
...
@@ -32,6 +32,8 @@ import PermIdentityOutlinedIcon from "@material-ui/icons/PermIdentityOutlined";
import
Avatar
from
"
@material-ui/core/Avatar
"
;
import
Chip
from
"
@material-ui/core/Chip
"
;
import
DoneIcon
from
"
@material-ui/icons/Done
"
;
import
CancelIcon
from
"
@material-ui/icons/Cancel
"
;
import
CardAvatar
from
"
components/Card/CardAvatar
"
;
import
List
from
"
@material-ui/core/List
"
;
import
ListItem
from
"
@material-ui/core/ListItem
"
;
...
...
@@ -200,36 +202,20 @@ export default function DisplayUserProfile(props) {
if
(
userStatus
===
false
)
{
return
(
<
Chip
style
=
{{
flex
:
1
}}
label
=
"
Active
"
avatar
=
{
<
Avatar
alt
=
{
user
.
username
}
src
=
{
user
.
profilePicture
?
"
data:image/png;base64,
"
+
user
.
profilePicture
:
noProfilePicture
}
/
>
}
color
=
"
primary
"
deleteIcon
=
{
<
DoneIcon
/>
}
variant
=
"
outlined
"
clickable
=
{
false
}
/
>
);
}
else
{
return
(
<
Chip
style
=
{{
flex
:
1
}}
label
=
"
Revoked
"
avatar
=
{
<
Avatar
alt
=
{
user
.
username
}
src
=
{
user
.
profilePicture
?
"
data:image/png;base64,
"
+
user
.
profilePicture
:
noProfilePicture
}
/
>
}
deleteIcon
=
{
<
DoneIcon
/>
}
variant
=
"
outlined
"
clickable
=
{
false
}
disabled
/>
);
}
...
...
@@ -302,18 +288,11 @@ export default function DisplayUserProfile(props) {
<
GridContainer
>
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
8
}
>
<
Card
profile
>
<
CardHeader
color
=
"
info
"
stats
icon
>
<
CardIcon
color
=
"
info
"
>
<
PermIdentityOutlinedIcon
/>
<
/CardIcon
>
<
p
className
=
{
classes
.
cardCategory
}
>
{
"
Profile information
"
}
<
/p
>
<
h3
className
=
{
classes
.
cardTitle
}
>
{
user
.
username
}
<
/h3
>
{
getUserStatus
(
user
)}
<
/CardHeader
>
<
CardBody
profile
>
<
div
className
=
{
classes
.
root
}
>
<
Grid
container
spacing
=
{
2
}
>
<
Grid
item
align
=
"
center
"
xs
=
{
12
}
sm
=
{
12
}
md
=
{
12
}
>
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
CardAvatar
displayProfile
>
<
img
src
=
{
user
.
profilePicture
...
...
@@ -323,7 +302,15 @@ export default function DisplayUserProfile(props) {
className
=
{
classes
.
editProfilePicture
}
alt
=
"
...
"
/>
<
h4
>
{
user
.
username
?
user
.
username
:
"
no username
"
}
<
/h4
>
<
/CardAvatar
>
<
/Grid
>
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
h3
className
=
{
classes
.
cardTitle
}
>
{
user
.
username
?
user
.
username
:
"
no username
"
}
<
/h3
>
{
getUserStatus
(
user
)}
<
/Grid
>
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
>
<
List
dense
=
{
false
}
>
...
...
@@ -342,12 +329,14 @@ export default function DisplayUserProfile(props) {
<
ListItem
>
<
ListItemAvatar
>
<
Avatar
>
<
P
erson
OutlinedIcon
/>
<
P
honeInTalk
OutlinedIcon
/>
<
/Avatar
>
<
/ListItemAvatar
>
<
ListItemText
primary
=
{
user
.
lastName
?
user
.
lastName
:
"
no lastname
"
user
.
phoneNumber
?
user
.
phoneNumber
:
"
no phone number
"
}
/
>
<
/ListItem
>
...
...
@@ -383,14 +372,12 @@ export default function DisplayUserProfile(props) {
<
ListItem
>
<
ListItemAvatar
>
<
Avatar
>
<
P
honeInTalk
OutlinedIcon
/>
<
P
erson
OutlinedIcon
/>
<
/Avatar
>
<
/ListItemAvatar
>
<
ListItemText
primary
=
{
user
.
phoneNumber
?
user
.
phoneNumber
:
"
no phone number
"
user
.
lastName
?
user
.
lastName
:
"
no lastname
"
}
/
>
<
/ListItem
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment