Don't display if we don't have a chat.

This commit is contained in:
Roger Braun 2017-12-05 14:20:34 +01:00
parent a03b92e252
commit 6c4e3a509a
3 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,7 @@
</div>
<div class="panel-body base01-background">
<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">
<img :src="message.author.avatar" />
{{message.author.username}}:

View File

@ -2,6 +2,9 @@ const NavPanel = {
computed: {
currentUser () {
return this.$store.state.users.currentUser
},
chat () {
return this.$store.state.chat.channel
}
}
}

View File

@ -7,7 +7,7 @@
{{ $t("nav.timeline") }}
</router-link>
</li>
<li v-if='currentUser'>
<li v-if='chat && currentUser'>
<router-link class="base00-background" to='/chat'>
{{ $t("nav.chat") }}
</router-link>