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
.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
h2 {{ $t('photo') }}
img.img-rendering-auto(v-if='user.profile.imageUrl', :src='user.profile.imageUrl')
p(v-else) {{ $t('noPhoto') }}
.col-4
.info
@@ -671,8 +673,7 @@ export default {
this.achievements = achievementsLib.getAchievementsForProfile(user);
// @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;
},
incentivesProgress () {