diff options
Diffstat (limited to 'app/assets/javascripts/repository/router.js')
-rw-r--r-- | app/assets/javascripts/repository/router.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/assets/javascripts/repository/router.js b/app/assets/javascripts/repository/router.js index 0a675e14eb5..5f73912ed2b 100644 --- a/app/assets/javascripts/repository/router.js +++ b/app/assets/javascripts/repository/router.js @@ -13,15 +13,19 @@ export default function createRouter(base, baseRef) { component: TreePage, props: (route) => ({ path: route.params.path?.replace(/^\//, '') || '/', + refType: route.query.ref_type || null, }), }; const blobPathRoute = { component: BlobPage, - props: (route) => ({ - path: route.params.path, - projectPath: base, - }), + props: (route) => { + return { + path: route.params.path, + projectPath: base, + refType: route.query.ref_type || null, + }; + }, }; const router = new VueRouter({ @@ -56,6 +60,9 @@ export default function createRouter(base, baseRef) { path: '/', name: 'projectRoot', component: IndexPage, + props: { + refType: 'HEADS', + }, }, ], }); |