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