hardlounge/client/components/Channel.vue

52 lines
1.2 KiB
Vue
Raw Normal View History

<template>
2019-03-03 14:43:57 -05:00
<ChannelWrapper
ref="wrapper"
:network="network"
:channel="channel"
:active-channel="activeChannel"
>
<span class="name">{{ channel.name }}</span>
2019-07-17 05:33:59 -04:00
<span v-if="channel.unread" :class="{highlight: channel.highlight}" class="badge">{{
channel.unread | roundBadgeNumber
}}</span>
<template v-if="channel.type === 'channel'">
<span
v-if="channel.state === 0"
class="parted-channel-tooltip tooltipped tooltipped-w"
aria-label="Not currently joined"
>
<span class="parted-channel-icon" />
</span>
2019-08-03 15:03:45 -04:00
<span class="close-tooltip tooltipped tooltipped-w" aria-label="Leave">
<button class="close" aria-label="Leave" @click="close" />
</span>
</template>
<template v-else>
2019-08-03 15:03:45 -04:00
<span class="close-tooltip tooltipped tooltipped-w" aria-label="Close">
<button class="close" aria-label="Close" @click="close" />
</span>
</template>
</ChannelWrapper>
</template>
<script>
import ChannelWrapper from "./ChannelWrapper.vue";
2018-07-08 16:08:08 -04:00
export default {
name: "Channel",
components: {
ChannelWrapper,
},
props: {
activeChannel: Object,
network: Object,
channel: Object,
2018-07-08 16:08:08 -04:00
},
2019-03-03 14:43:57 -05:00
methods: {
close() {
this.$refs.wrapper.close();
},
},
};
</script>