thelounge/client/components/Username.vue
2019-07-19 11:27:40 +01:00

25 lines
432 B
Vue

<template>
<span
:class="['user', $options.filters.colorClass(user.nick), {active: active}]"
:data-name="user.nick"
role="button"
v-on="onHover ? {mouseover: hover} : {}"
>{{ user.mode }}{{ user.nick }}</span
>
</template>
<script>
export default {
name: "Username",
props: {
user: Object,
active: Boolean,
onHover: Function,
},
methods: {
hover() {
return this.onHover(this.user);
},
},
};
</script>