Compare commits
1 Commits
main
...
router-has
Author | SHA1 | Date | |
---|---|---|---|
28b2f1aa62 |
|
@ -10,4 +10,5 @@
|
||||||
# SENTRY_AUTH_TOKEN=YOUR_TOKEN
|
# SENTRY_AUTH_TOKEN=YOUR_TOKEN
|
||||||
# SENTRY_ORG=vikunja
|
# SENTRY_ORG=vikunja
|
||||||
# SENTRY_PROJECT=frontend-oss
|
# SENTRY_PROJECT=frontend-oss
|
||||||
# VIKUNJA_FRONTEND_BASE=/custom-subpath
|
# VIKUNJA_FRONTEND_BASE=/custom-subpath
|
||||||
|
# VITE_ROUTER_HISTORY_MODE_IS_HASH=false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
|
||||||
import type { RouteLocation } from 'vue-router'
|
import type { RouteLocation } from 'vue-router'
|
||||||
import {saveLastVisited} from '@/helpers/saveLastVisited'
|
import {saveLastVisited} from '@/helpers/saveLastVisited'
|
||||||
|
|
||||||
|
@ -81,7 +81,9 @@ const EditTeamComponent = () => import('@/views/teams/EditTeam.vue')
|
||||||
const NewTeamComponent = () => import('@/views/teams/NewTeam.vue')
|
const NewTeamComponent = () => import('@/views/teams/NewTeam.vue')
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: import.meta.env.VITE_ROUTER_HISTORY_MODE_IS_HASH === 'true'
|
||||||
|
? createWebHashHistory(import.meta.env.BASE_URL)
|
||||||
|
: createWebHistory(import.meta.env.BASE_URL),
|
||||||
scrollBehavior(to, from, savedPosition) {
|
scrollBehavior(to, from, savedPosition) {
|
||||||
// If the user is using their forward/backward keys to navigate, we want to restore the scroll view
|
// If the user is using their forward/backward keys to navigate, we want to restore the scroll view
|
||||||
if (savedPosition) {
|
if (savedPosition) {
|
||||||
|
|
Reference in New Issue
Block a user