thelounge/client/components/InlineChannel.vue

31 lines
487 B
Vue
Raw Normal View History

2019-10-17 16:17:02 +02:00
<template>
<span
class="inline-channel"
dir="auto"
role="button"
tabindex="0"
@click.prevent="openContextMenu"
@contextmenu.prevent="openContextMenu"
2019-10-17 16:17:02 +02:00
><slot></slot
></span>
</template>
<script>
import eventbus from "../js/eventbus";
2019-11-12 16:51:40 +01:00
2019-10-17 16:17:02 +02:00
export default {
name: "InlineChannel",
props: {
channel: String,
},
methods: {
openContextMenu(event) {
eventbus.emit("contextmenu:inline-channel", {
event: event,
channel: this.channel,
2019-10-17 16:17:02 +02:00
});
},
},
};
</script>