forked from vikunja/frontend
chore: add env var to use createWebHashHistory
This commit is contained in:
parent
0fd44e9484
commit
28b2f1aa62
|
@ -11,3 +11,4 @@
|
||||||
# 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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user