Init Contact Panel (#206)

This commit is contained in:
Pranav Raj S 2019-11-14 13:46:43 +05:30 committed by GitHub
parent b985085786
commit 88fc4d894a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 138 additions and 11 deletions

View file

@ -13,12 +13,14 @@
class="user-thumbnail"
background-color="#1f93ff"
color="white"
:size="avatarSize"
>
</Avatar>
<img
v-if="badge === 'Facebook'"
id="badge"
class="source-badge"
:style="badgeStyle"
src="~dashboard/assets/images/fb-badge.png"
/>
</div>
@ -58,6 +60,15 @@ export default {
imgError: false,
};
},
computed: {
avatarSize() {
return Number(this.size.replace(/\D+/g, ''));
},
badgeStyle() {
const badgeSize = `${this.avatarSize / 3}px`;
return { width: badgeSize, height: badgeSize };
},
},
methods: {
onImgError() {
this.imgError = true;