thelounge/client/components/Username.vue

26 lines
432 B
Vue
Raw Normal View History

<template>
<span
2019-07-17 09:33:59 +00:00
:class="['user', $options.filters.colorClass(user.nick), {active: active}]"
:data-name="user.nick"
role="button"
2019-07-17 09:33:59 +00:00
v-on="onHover ? {mouseover: hover} : {}"
>{{ user.mode }}{{ user.nick }}</span
>
</template>
<script>
export default {
name: "Username",
props: {
user: Object,
active: Boolean,
2018-07-10 23:25:21 +00:00
onHover: Function,
},
methods: {
hover() {
return this.onHover(this.user);
2018-07-10 23:25:21 +00:00
},
},
};
</script>