Skip to content

Commit

Permalink
fix: fix avatar vue (#1969)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Oct 30, 2018
1 parent 3982a18 commit 15f254a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 27 deletions.
2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/js/app.js": "/js/app.js?id=98d03cdde7d5918cdc24",
"/js/app.js": "/js/app.js?id=dff40480d2baf1a29a57",
"/css/app-ltr.css": "/css/app-ltr.css?id=72df74c30fc7f5c2a421",
"/css/app-rtl.css": "/css/app-rtl.css?id=382b6cc7915e4358dbce",
"/css/stripe.css": "/css/stripe.css?id=64c68c04c4e475fcc7c6",
Expand Down
37 changes: 12 additions & 25 deletions resources/assets/js/components/partials/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,20 @@

<template>
<div>
<div v-if="clickable == true">
<div class="tc" v-if="contact.has_avatar">
<img v-if="contact.has_avatar" :src="contact.avatar_url" class="br4 h3 w3 dib" v-tooltip.bottom="contact.complete_name" @click="goToContact()">
</div>

<div class="tc" v-if="contact.avatar_url">
<img :src="contact.avatar_url" class="br4 h3 w3 dib" width="43" v-tooltip.bottom="contact.complete_name" @click="goToContact()">
</div>

<div v-if="!contact.has_avatar" v-tooltip.bottom="contact.complete_name" :style="{ 'background-color': contact.default_avatar_color }" class="br4 h3 w3 dib pt3 white tc f4" @click="goToContact()">
{{ contact.initials }}
</div>
</div>

<div v-if="clickable == false">
<div class="tc" v-if="contact.has_avatar">
<img v-if="contact.has_avatar" :src="contact.avatar_url" class="br4 h3 w3 dib" v-tooltip="contact.complete_name">
</div>

<div class="tc" v-if="contact.avatar_url">
<img :src="contact.gravatar_url" class="br4 h3 w3 dib" width="43" v-tooltip="contact.complete_name">
</div>

<div v-if="!contact.has_avatar" v-tooltip.bottom="contact.complete_name" :style="{ 'background-color': contact.default_avatar_color }" class="br4 h3 w3 dib pt3 white tc f4">
<template v-if="clickable == true">
<a :href="'/people/' + contact.id">
<img v-if="contact.avatar_url" :src="contact.avatar_url" class="br4 h3 w3 dib tc" v-tooltip.bottom="contact.complete_name">
<div v-else v-tooltip.bottom="contact.complete_name" :style="{ 'background-color': contact.default_avatar_color }" class="br4 h3 w3 dib pt3 white tc f4">
{{ contact.initials }}
</div>
</a>
</template>
<template v-else>
<img v-if="contact.avatar_url" :src="contact.avatar_url" class="br4 h3 w3 dib tc" v-tooltip.bottom="contact.complete_name">
<div v-else v-tooltip.bottom="contact.complete_name" :style="{ 'background-color': contact.default_avatar_color }" class="br4 h3 w3 dib pt3 white tc f4">
{{ contact.initials }}
</div>
</div>
</template>
</div>
</template>

Expand Down

0 comments on commit 15f254a

Please sign in to comment.