thelounge/client/components/Channel.vue

50 lines
1 KiB
Vue
Raw Normal View History

<template>
<ChannelWrapper
:network="network"
:channel="channel"
:active-channel="activeChannel">
<span
:title="channel.name"
class="name">{{ channel.name }}</span>
<span v-if="channel.type === 'channel' && channel.state === 0">(parted)</span>
<span
v-if="channel.unread"
:class="{ highlight: channel.highlight }"
class="badge">{{ channel.unread | roundBadgeNumber }}</span>
<template v-if="channel.type === 'channel'">
<span
class="close-tooltip tooltipped tooltipped-w"
aria-label="Leave">
<button
class="close"
2018-07-29 19:57:14 +02:00
aria-label="Leave" />
</span>
</template>
<template v-else>
<span
class="close-tooltip tooltipped tooltipped-w"
aria-label="Close">
<button
class="close"
2018-07-29 19:57:14 +02:00
aria-label="Close" />
</span>
</template>
</ChannelWrapper>
</template>
<script>
import ChannelWrapper from "./ChannelWrapper.vue";
2018-07-08 22:08:08 +02:00
export default {
name: "Channel",
components: {
ChannelWrapper,
},
props: {
activeChannel: Object,
network: Object,
channel: Object,
2018-07-08 22:08:08 +02:00
},
};
</script>