From 22e8258a56ab0828231bc0e510b52dd39eebb5c7 Mon Sep 17 00:00:00 2001 From: wakarimasen Date: Sun, 5 Mar 2017 11:56:28 +0100 Subject: Highlight current notice in conversation-page, add backlinks --- src/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index fa0a872f..30929f0b 100644 --- a/src/main.js +++ b/src/main.js @@ -53,7 +53,7 @@ const routes = [ { path: '/main/all', component: PublicAndExternalTimeline }, { path: '/main/public', component: PublicTimeline }, { path: '/main/friends', component: FriendsTimeline }, - { name: 'conversation', path: '/notice/:id', component: ConversationPage }, + { 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: 'settings', path: '/settings', component: Settings } @@ -63,6 +63,9 @@ const router = new VueRouter({ mode: 'history', routes, scrollBehavior: (to, from, savedPosition) => { + if (to.matched.some(m => m.meta.dontScroll)) { + return false + } return savedPosition || { x: 0, y: 0 } } }) -- cgit v1.2.3-70-g09d2