2018-07-08 19:02:36 +00:00
|
|
|
<template>
|
|
|
|
<span
|
2019-11-05 10:36:44 +00:00
|
|
|
:class="['user', nickColor, {active: active}]"
|
2018-07-08 19:02:36 +00:00
|
|
|
:data-name="user.original.nick"
|
2018-07-08 20:08:08 +00:00
|
|
|
role="button"
|
2019-11-23 14:26:20 +00:00
|
|
|
@mouseover="onHover(user.original)"
|
|
|
|
@click.prevent="openContextMenu"
|
|
|
|
@contextmenu.prevent="openContextMenu"
|
2019-02-25 05:38:13 +00:00
|
|
|
v-html="user.original.mode + user.string"
|
|
|
|
/>
|
2018-07-08 19:02:36 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2019-11-16 17:24:03 +00:00
|
|
|
import colorClass from "../js/helpers/colorClass";
|
2019-11-05 10:36:44 +00:00
|
|
|
|
2018-07-08 19:02:36 +00:00
|
|
|
export default {
|
|
|
|
name: "UsernameFiltered",
|
|
|
|
props: {
|
|
|
|
user: Object,
|
2018-07-10 20:29:53 +00:00
|
|
|
active: Boolean,
|
2018-07-10 23:25:21 +00:00
|
|
|
onHover: Function,
|
|
|
|
},
|
2019-11-05 10:36:44 +00:00
|
|
|
computed: {
|
|
|
|
nickColor() {
|
|
|
|
return colorClass(this.user.original.nick);
|
|
|
|
},
|
|
|
|
},
|
2018-07-10 23:25:21 +00:00
|
|
|
methods: {
|
2019-11-23 14:26:20 +00:00
|
|
|
openContextMenu(event) {
|
|
|
|
this.$root.$emit("contextmenu:user", {
|
|
|
|
event: event,
|
|
|
|
user: this.user.original,
|
|
|
|
});
|
2019-11-09 22:21:34 +00:00
|
|
|
},
|
2018-07-08 19:02:36 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|