Added empty state values for photo and description in user profile (#9201)

This commit is contained in:
borisabramovich86
2017-10-18 23:36:26 +03:00
committed by Sabe Jones
parent 15626b8ae1
commit 0450e9c3ae
2 changed files with 6 additions and 3 deletions

View File

@@ -37,10 +37,12 @@ div
.col-8 .col-8
.about .about
h2 {{ $t('about') }} h2 {{ $t('about') }}
p(v-markdown='user.profile.blurb') p(v-if='user.profile.blurb', v-markdown='user.profile.blurb')
p(v-else) {{ $t('noDescription') }}
.photo .photo
h2 {{ $t('photo') }} h2 {{ $t('photo') }}
img.img-rendering-auto(v-if='user.profile.imageUrl', :src='user.profile.imageUrl') img.img-rendering-auto(v-if='user.profile.imageUrl', :src='user.profile.imageUrl')
p(v-else) {{ $t('noPhoto') }}
.col-4 .col-4
.info .info
@@ -671,8 +673,7 @@ export default {
this.achievements = achievementsLib.getAchievementsForProfile(user); this.achievements = achievementsLib.getAchievementsForProfile(user);
// @TODO For some reason markdown doesn't seem to be handling numbers or maybe undefined? // @TODO For some reason markdown doesn't seem to be handling numbers or maybe undefined?
user.profile.blurb = `${user.profile.blurb}`; user.profile.blurb = user.profile.blurb ? `${user.profile.blurb}` : '';
return user; return user;
}, },
incentivesProgress () { incentivesProgress () {

View File

@@ -3,6 +3,8 @@
"profile": "Profile", "profile": "Profile",
"avatar": "Customize Avatar", "avatar": "Customize Avatar",
"editAvatar": "Edit Avatar", "editAvatar": "Edit Avatar",
"noDescription": "This Habitican hasn't added a description.",
"noPhoto": "This Habitican hasn't added a photo.",
"other": "Other", "other": "Other",
"fullName": "Full Name", "fullName": "Full Name",
"displayName": "Display Name", "displayName": "Display Name",