Skip to content

Instantly share code, notes, and snippets.

@sanath-kumar
Created July 19, 2018 14:34
Show Gist options
  • Save sanath-kumar/51850da16dd7c0fce433a64b0c9f2038 to your computer and use it in GitHub Desktop.
Save sanath-kumar/51850da16dd7c0fce433a64b0c9f2038 to your computer and use it in GitHub Desktop.
<template lang="html">
<v-tooltip left>
<span slot="activator">
<p class="grey--text text--darken-2">
<b class="indigo--text" v-if="isMyHandle(chat.handle)">{{chat.handle}} :</b>
<b class="pink--text" v-else>Me :</b>
{{chat.message}}
</p>
</span>
<span>{{chat.created | moment("HH:MM, DD-MM-YY")}}</span>
</v-tooltip>
</template>
<script>
export default {
props : ['chat'],
methods : {
isMyHandle(handle){
if (handle == this.$store.getters.HANDLE) {
return true
}else{
return false
}
}
},
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment