aboutsummaryrefslogtreecommitdiff
path: root/src/boot/routes.js
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-07-13 13:25:23 -0500
committerMark Felder <feld@FreeBSD.org>2020-07-13 13:25:23 -0500
commitda94935aaa18f16ac7fbe715c4610427d68ccf72 (patch)
tree52691b7cbac2773858b245e596d56c1c5e6ea74b /src/boot/routes.js
parent2eda3d687e8c986a982057c6f5eb969aa8d403d5 (diff)
parent3e09a708f600b47dde831eeddb412828b38a0cf4 (diff)
Merge branch 'develop' into refactor/notification_settings
Diffstat (limited to 'src/boot/routes.js')
-rw-r--r--src/boot/routes.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/boot/routes.js b/src/boot/routes.js
index d98a3b50..b5d3c631 100644
--- a/src/boot/routes.js
+++ b/src/boot/routes.js
@@ -2,9 +2,12 @@ import PublicTimeline from 'components/public_timeline/public_timeline.vue'
import PublicAndExternalTimeline from 'components/public_and_external_timeline/public_and_external_timeline.vue'
import FriendsTimeline from 'components/friends_timeline/friends_timeline.vue'
import TagTimeline from 'components/tag_timeline/tag_timeline.vue'
+import BookmarkTimeline from 'components/bookmark_timeline/bookmark_timeline.vue'
import ConversationPage from 'components/conversation-page/conversation-page.vue'
import Interactions from 'components/interactions/interactions.vue'
import DMs from 'components/dm_timeline/dm_timeline.vue'
+import ChatList from 'components/chat_list/chat_list.vue'
+import Chat from 'components/chat/chat.vue'
import UserProfile from 'components/user_profile/user_profile.vue'
import Search from 'components/search/search.vue'
import Registration from 'components/registration/registration.vue'
@@ -27,7 +30,7 @@ export default (store) => {
}
}
- return [
+ let routes = [
{ name: 'root',
path: '/',
redirect: _to => {
@@ -40,6 +43,7 @@ export default (store) => {
{ name: 'public-timeline', path: '/main/public', component: PublicTimeline },
{ name: 'friends', path: '/main/friends', component: FriendsTimeline, beforeEnter: validateAuthenticatedRoute },
{ name: 'tag-timeline', path: '/tag/:tag', component: TagTimeline },
+ { name: 'bookmarks', path: '/bookmarks', component: BookmarkTimeline },
{ name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } },
{ name: 'remote-user-profile-acct',
path: '/remote-users/(@?):username([^/@]+)@:hostname([^/@]+)',
@@ -60,11 +64,20 @@ export default (store) => {
{ name: 'friend-requests', path: '/friend-requests', component: FollowRequests, beforeEnter: validateAuthenticatedRoute },
{ name: 'notifications', path: '/:username/notifications', component: Notifications, beforeEnter: validateAuthenticatedRoute },
{ name: 'login', path: '/login', component: AuthForm },
- { name: 'chat', path: '/chat', component: ChatPanel, props: () => ({ floating: false }) },
+ { name: 'chat-panel', path: '/chat-panel', component: ChatPanel, props: () => ({ floating: false }) },
{ name: 'oauth-callback', path: '/oauth-callback', component: OAuthCallback, props: (route) => ({ code: route.query.code }) },
{ name: 'search', path: '/search', component: Search, props: (route) => ({ query: route.query.query }) },
{ name: 'who-to-follow', path: '/who-to-follow', component: WhoToFollow, beforeEnter: validateAuthenticatedRoute },
{ name: 'about', path: '/about', component: About },
{ name: 'user-profile', path: '/(users/)?:name', component: UserProfile }
]
+
+ if (store.state.instance.pleromaChatMessagesAvailable) {
+ routes = routes.concat([
+ { name: 'chat', path: '/users/:username/chats/:recipient_id', component: Chat, meta: { dontScroll: false }, beforeEnter: validateAuthenticatedRoute },
+ { name: 'chats', path: '/users/:username/chats', component: ChatList, meta: { dontScroll: false }, beforeEnter: validateAuthenticatedRoute }
+ ])
+ }
+
+ return routes
}