Add direct message tab.
This commit is contained in:
parent
7f13cbc493
commit
b37a0f4f23
|
@ -8,6 +8,7 @@ import FriendsTimeline from '../components/friends_timeline/friends_timeline.vue
|
|||
import TagTimeline from '../components/tag_timeline/tag_timeline.vue'
|
||||
import ConversationPage from '../components/conversation-page/conversation-page.vue'
|
||||
import Mentions from '../components/mentions/mentions.vue'
|
||||
import DMs from '../components/dm_timeline/dm_timeline.vue'
|
||||
import UserProfile from '../components/user_profile/user_profile.vue'
|
||||
import Settings from '../components/settings/settings.vue'
|
||||
import Registration from '../components/registration/registration.vue'
|
||||
|
@ -88,6 +89,7 @@ const afterStoreSetup = ({store, i18n}) => {
|
|||
{ name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } },
|
||||
{ name: 'user-profile', path: '/users/:id', component: UserProfile },
|
||||
{ name: 'mentions', path: '/:username/mentions', component: Mentions },
|
||||
{ name: 'dms', path: '/:username/dms', component: DMs },
|
||||
{ name: 'settings', path: '/settings', component: Settings },
|
||||
{ name: 'registration', path: '/registration', component: Registration },
|
||||
{ name: 'registration', path: '/registration/:token', component: Registration },
|
||||
|
|
|
@ -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
|
|
@ -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") }}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
"chat": "Local Chat",
|
||||
"friend_requests": "Follow Requests",
|
||||
"mentions": "Mentions",
|
||||
"dms": "Direct Messages",
|
||||
"public_tl": "Public Timeline",
|
||||
"timeline": "Timeline",
|
||||
"twkn": "The Whole Known Network"
|
||||
|
|
|
@ -41,7 +41,8 @@ export const defaultState = {
|
|||
own: emptyTl(),
|
||||
publicAndExternal: emptyTl(),
|
||||
friends: emptyTl(),
|
||||
tag: emptyTl()
|
||||
tag: emptyTl(),
|
||||
dms: emptyTl()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue