generated from Seekra/repository-template
chore: resolve merge conflicts
This commit is contained in:
+5
-5389
File diff suppressed because it is too large
Load Diff
+6
-19
@@ -40,7 +40,7 @@ const routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/settings/:rest(.*)*',
|
||||
path: '/settings',
|
||||
name: 'settings',
|
||||
component: SettingsView,
|
||||
meta: {
|
||||
@@ -59,30 +59,17 @@ const router = createRouter({
|
||||
routes
|
||||
});
|
||||
|
||||
// remove trailing slash(es)
|
||||
router.beforeEach((route) => {
|
||||
if (route.path !== '/' && route.path.endsWith('/')) {
|
||||
return {
|
||||
path: route.path.replace(/\/+$/, ''),
|
||||
query: route.query,
|
||||
hash: route.hash,
|
||||
replace: true
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
// set page title
|
||||
router.afterEach(to => {
|
||||
export const updatePageTitle = function updatePageTitle (route) {
|
||||
const title =
|
||||
typeof to.meta.title === 'function'
|
||||
? to.meta.title(to)
|
||||
: to.meta.title;
|
||||
typeof route.meta.title === 'function'
|
||||
? route.meta.title(route)
|
||||
: route.meta.title;
|
||||
|
||||
if (title) {
|
||||
document.title = `${title} - Seekra`;
|
||||
} else {
|
||||
document.title = 'Seekra';
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user