Use router-link for the channel names
This commit is contained in:
parent
cfd70999a3
commit
fc30b58069
|
|
@ -1,21 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="channel--name" @click="select(channel)">
|
<div class="channel--name" @click="select(channel)">
|
||||||
{{ channel.name }} <span :class="{ tag: true, 'is-success': channel.unread > 0}">{{ channel.unread }}</span>
|
<router-link :to='"/channel/" + channel.uid'>
|
||||||
|
{{ channel.name }}
|
||||||
|
<span :class="{ tag: true, 'is-success': channel.unread > 0}">{{ channel.unread }}</span>
|
||||||
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "Channel",
|
name: "Channel",
|
||||||
|
props: ['channel']
|
||||||
props: ['channel'],
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
select(channel) {
|
|
||||||
this.$emit('channel-selected', channel)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user