Merge branch 'gm-default-avatar' into 'master'

ui: default avatar added

See merge request startinblox/applications/sib-app!30
This commit is contained in:
Jean-Baptiste Pasquier 2019-05-16 20:09:26 +00:00
commit 67081b30e9
9 changed files with 18 additions and 14 deletions

12
package-lock.json generated
View File

@ -246,7 +246,7 @@
},
"acorn": {
"version": "3.3.0",
"resolved": "http://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
"integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=",
"dev": true
},
@ -2780,7 +2780,7 @@
},
"minimist": {
"version": "0.0.8",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
@ -2809,7 +2809,7 @@
},
"mkdirp": {
"version": "0.5.1",
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
@ -3314,7 +3314,7 @@
},
"chalk": {
"version": "1.1.3",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true,
"requires": {
@ -3485,7 +3485,7 @@
},
"readable-stream": {
"version": "2.3.6",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
@ -4273,7 +4273,7 @@
},
"yargs": {
"version": "3.10.0",
"resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
"dev": true,
"requires": {

View File

@ -20,5 +20,5 @@ script(type="module" src="https://unpkg.com/@startinblox/router@0.7.2")
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.1.7")
script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.1.12")
script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.2.1")
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.1.15")
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.1.16")

View File

@ -11,15 +11,13 @@ sib-notifications(
bind-user
)
sib-widget(name="user-picture")
template
img(name="${name}",src="\${value || '/images/user.jpg'}",style="max-width:100%; max-height: 100%;")
include templates/hd-user-avatar.pug
details#user-controls
summary(tabindex='0' role='button')
sib-display#user-controls__profile(
data-fields='first_name, account.picture',
widget-account.picture='user-picture',
widget-account.picture='hd-user-avatar',
bind-user
)
#user-controls__panel

View File

@ -1,5 +1,6 @@
div.job-offers__main
include templates/hd-user-avatar.pug
include templates/template-groups.pug
include templates/template-skills.pug
include templates/template-joboffers-filter.pug
@ -12,7 +13,7 @@ div.job-offers__main
data-fields='user-thumb, creationDate, title, description, skills, send',
set-user-thumb='author.account.picture, author.first_name, author.groups',
widget-author.account.picture='sib-display-img',
widget-author.account.picture='hd-user-avatar',
widget-author.groups='groups-name',
multiple-author.groups,

View File

@ -87,7 +87,7 @@
}
}
sib-display-img {
hd-user-avatar {
background-color: $color-0-0-100;
border-radius: 50%;
height: 4.25rem;

View File

@ -0,0 +1,3 @@
sib-widget(name='hd-user-avatar')
template
img(name="${name}",src="\${value || '/images/alien.jpg'}",style="max-width:100%; max-height: 100%;")

View File

@ -1,9 +1,11 @@
include hd-user-avatar.pug
sib-widget(name='team-template')
template
sib-display(
data-src="${value.user['@id']}"
data-fields='account.picture',
widget-account.picture='sib-display-img'
widget-account.picture='hd-user-avatar'
)
div(name='user.thumb')
span ${value.user.name}

BIN
www/images/alien.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB