diff --git a/package.json b/package.json index 18e79e16..8f2a78a2 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "whatwg-fetch": "^2.0.3" }, "devDependencies": { + "@vue/test-utils": "^1.0.0-beta.26", "autoprefixer": "^6.4.0", "babel-core": "^6.0.0", "babel-eslint": "^7.0.0", diff --git a/src/boot/routes.js b/src/boot/routes.js index 715c2fe8..f6a1eff8 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -1,17 +1,17 @@ -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 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' -import UserSettings from '../components/user_settings/user_settings.vue' -import FollowRequests from '../components/follow_requests/follow_requests.vue' -import OAuthCallback from '../components/oauth_callback/oauth_callback.vue' -import UserSearch from '../components/user_search/user_search.vue' +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 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' +import UserSettings from 'components/user_settings/user_settings.vue' +import FollowRequests from 'components/follow_requests/follow_requests.vue' +import OAuthCallback from 'components/oauth_callback/oauth_callback.vue' +import UserSearch from 'components/user_search/user_search.vue' export default (store) => { return [ @@ -20,23 +20,23 @@ export default (store) => { redirect: _to => { return (store.state.users.currentUser ? store.state.instance.redirectRootLogin - : store.state.instance.redirectRootNoLogin) || '/main/all' + : store.state.instance.redirectRootNoLogin) || '/p/main/all' } }, - { path: '/main/all', component: PublicAndExternalTimeline }, - { path: '/main/public', component: PublicTimeline }, - { path: '/main/friends', component: FriendsTimeline }, - { path: '/tag/:tag', component: TagTimeline }, - { name: 'conversation', path: '/notice/:id', component: ConversationPage, meta: { dontScroll: true } }, - { name: 'user-profile', path: '/users/:id', component: UserProfile }, + { name: 'public-external-timeline', path: '/p/main/all', component: PublicAndExternalTimeline }, + { name: 'public-timeline', path: '/p/main/public', component: PublicTimeline }, + { name: 'friends', path: '/p/main/friends', component: FriendsTimeline }, + { name: 'tag-timeline', path: '/p/tag/:tag', component: TagTimeline }, + { name: 'conversation', path: '/p/notice/:id', component: ConversationPage, meta: { dontScroll: true } }, + { name: 'user-profile', path: '/:name', 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 }, - { name: 'friend-requests', path: '/friend-requests', component: FollowRequests }, - { name: 'user-settings', path: '/user-settings', component: UserSettings }, - { name: 'oauth-callback', path: '/oauth-callback', component: OAuthCallback, props: (route) => ({ code: route.query.code }) }, - { name: 'user-search', path: '/user-search', component: UserSearch, props: (route) => ({ query: route.query.query }) } + { name: 'settings', path: '/p/settings', component: Settings }, + { name: 'registration', path: '/p/registration', component: Registration }, + { name: 'registration', path: '/p/registration/:token', component: Registration }, + { name: 'friend-requests', path: '/p/friend-requests', component: FollowRequests }, + { name: 'user-settings', path: '/p/user-settings', component: UserSettings }, + { name: 'oauth-callback', path: '/p/oauth-callback', component: OAuthCallback, props: (route) => ({ code: route.query.code }) }, + { name: 'user-search', path: '/p/user-search', component: UserSearch, props: (route) => ({ query: route.query.query }) } ] } diff --git a/src/components/chat_panel/chat_panel.vue b/src/components/chat_panel/chat_panel.vue index 30070d3e..e3671818 100644 --- a/src/components/chat_panel/chat_panel.vue +++ b/src/components/chat_panel/chat_panel.vue @@ -13,7 +13,7 @@
{{ $t('post_status.direct_warning') }}
@@ -34,10 +34,10 @@