Add direct message tab.

This commit is contained in:
Roger Braun 2018-11-13 20:34:56 +01:00
parent 7f13cbc493
commit b37a0f4f23
7 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,14 @@
import Timeline from '../timeline/timeline.vue'
const DMs = {
computed: {
timeline () {
return this.$store.state.statuses.timelines.dms
}
},
components: {
Timeline
}
}
export default DMs

View file

@ -0,0 +1,5 @@
<template>
<Timeline :title="$t('nav.dms')" v-bind:timeline="timeline" v-bind:timeline-name="'dms'"/>
</template>
<script src="./dm_timeline.js"></script>

View file

@ -5,6 +5,9 @@ const NavPanel = {
},
chat () {
return this.$store.state.chat.channel
},
showDMs () {
return this.$store.state.instance.scopeOptionsEnabled
}
}
}

View file

@ -12,6 +12,11 @@
{{ $t("nav.mentions") }}
</router-link>
</li>
<li v-if='currentUser && showDMs'>
<router-link :to="{ name: 'dms', params: { username: currentUser.screen_name } }">
{{ $t("nav.dms") }}
</router-link>
</li>
<li v-if='currentUser && currentUser.locked'>
<router-link to='/friend-requests'>
{{ $t("nav.friend_requests") }}