Don't display if we don't have a chat.
This commit is contained in:
parent
a03b92e252
commit
6c4e3a509a
3 changed files with 5 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body base01-background">
|
<div class="panel-body base01-background">
|
||||||
<div class="chat-window">
|
<div class="chat-window">
|
||||||
<div class="chat-message" v-for="message in messages">
|
<div class="chat-message" v-for="message in messages" :key="message.id">
|
||||||
<span class="chat-avatar">
|
<span class="chat-avatar">
|
||||||
<img :src="message.author.avatar" />
|
<img :src="message.author.avatar" />
|
||||||
{{message.author.username}}:
|
{{message.author.username}}:
|
||||||
|
|
|
@ -2,6 +2,9 @@ const NavPanel = {
|
||||||
computed: {
|
computed: {
|
||||||
currentUser () {
|
currentUser () {
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
|
},
|
||||||
|
chat () {
|
||||||
|
return this.$store.state.chat.channel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{{ $t("nav.timeline") }}
|
{{ $t("nav.timeline") }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li v-if='currentUser'>
|
<li v-if='chat && currentUser'>
|
||||||
<router-link class="base00-background" to='/chat'>
|
<router-link class="base00-background" to='/chat'>
|
||||||
{{ $t("nav.chat") }}
|
{{ $t("nav.chat") }}
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
Loading…
Reference in a new issue