forked from AkkomaGang/akkoma-fe
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 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}}:
|
||||
|
|
|
@ -2,6 +2,9 @@ const NavPanel = {
|
|||
computed: {
|
||||
currentUser () {
|
||||
return this.$store.state.users.currentUser
|
||||
},
|
||||
chat () {
|
||||
return this.$store.state.chat.channel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue