forked from AkkomaGang/akkoma-fe
Merge branch 'dm-tab' into 'develop'
Direct Message tab See merge request pleroma/pleroma-fe!374
This commit is contained in:
commit
be6ebc176b
7 changed files with 31 additions and 1 deletions
src
boot
components
i18n
modules
services/api
|
@ -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 },
|
||||
|
|
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>
|
|
@ -12,6 +12,11 @@
|
|||
{{ $t("nav.mentions") }}
|
||||
</router-link>
|
||||
</li>
|
||||
<li v-if='currentUser'>
|
||||
<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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ const STATUS_URL = '/api/statuses/show'
|
|||
const MEDIA_UPLOAD_URL = '/api/statusnet/media/upload'
|
||||
const CONVERSATION_URL = '/api/statusnet/conversation'
|
||||
const MENTIONS_URL = '/api/statuses/mentions.json'
|
||||
const DM_TIMELINE_URL = '/api/statuses/dm_timeline.json'
|
||||
const FOLLOWERS_URL = '/api/statuses/followers.json'
|
||||
const FRIENDS_URL = '/api/statuses/friends.json'
|
||||
const FOLLOWING_URL = '/api/friendships/create.json'
|
||||
|
@ -292,6 +293,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false, use
|
|||
public: PUBLIC_TIMELINE_URL,
|
||||
friends: FRIENDS_TIMELINE_URL,
|
||||
mentions: MENTIONS_URL,
|
||||
dms: DM_TIMELINE_URL,
|
||||
notifications: QVITTER_USER_NOTIFICATIONS_URL,
|
||||
'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL,
|
||||
user: QVITTER_USER_TIMELINE_URL,
|
||||
|
|
Loading…
Reference in a new issue