Add direct message tab.
This commit is contained in:
parent
7f13cbc493
commit
b37a0f4f23
7 changed files with 32 additions and 1 deletions
14
src/components/dm_timeline/dm_timeline.js
Normal file
14
src/components/dm_timeline/dm_timeline.js
Normal 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
|
5
src/components/dm_timeline/dm_timeline.vue
Normal file
5
src/components/dm_timeline/dm_timeline.vue
Normal 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>
|
|
@ -5,6 +5,9 @@ const NavPanel = {
|
|||
},
|
||||
chat () {
|
||||
return this.$store.state.chat.channel
|
||||
},
|
||||
showDMs () {
|
||||
return this.$store.state.instance.scopeOptionsEnabled
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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") }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue