2018-07-10 09:37:48 +00:00
|
|
|
<template>
|
2018-07-10 09:40:55 +00:00
|
|
|
<span v-if="channel.data.text">{{ channel.data.text }}</span>
|
|
|
|
<table
|
|
|
|
v-else
|
2019-02-25 05:38:13 +00:00
|
|
|
class="channel-list"
|
|
|
|
>
|
2018-07-10 09:37:48 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="channel">Channel</th>
|
|
|
|
<th class="users">Users</th>
|
|
|
|
<th class="topic">Topic</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr
|
|
|
|
v-for="chan in channel.data"
|
2019-02-25 05:38:13 +00:00
|
|
|
:key="chan.channel"
|
|
|
|
>
|
2018-07-19 17:44:24 +00:00
|
|
|
<td class="channel"><ParsedMessage
|
|
|
|
:network="network"
|
2019-02-25 05:38:13 +00:00
|
|
|
:text="chan.channel"
|
|
|
|
/></td>
|
2018-07-10 09:37:48 +00:00
|
|
|
<td class="users">{{ chan.num_users }}</td>
|
2018-07-19 17:44:24 +00:00
|
|
|
<td class="topic"><ParsedMessage
|
|
|
|
:network="network"
|
2019-02-25 05:38:13 +00:00
|
|
|
:text="chan.topic"
|
|
|
|
/></td>
|
2018-07-10 09:37:48 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-07-12 08:41:40 +00:00
|
|
|
import ParsedMessage from "../ParsedMessage.vue";
|
|
|
|
|
2018-07-10 09:37:48 +00:00
|
|
|
export default {
|
|
|
|
name: "ListChannels",
|
2018-07-12 08:41:40 +00:00
|
|
|
components: {
|
|
|
|
ParsedMessage,
|
|
|
|
},
|
2018-07-10 09:37:48 +00:00
|
|
|
props: {
|
2018-07-19 17:44:24 +00:00
|
|
|
network: Object,
|
2018-07-10 09:37:48 +00:00
|
|
|
channel: Object,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|