chore: add env var to use `createWebHashHistory`
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
0fd44e9484
commit
28b2f1aa62
|
@ -10,4 +10,5 @@
|
|||
# SENTRY_AUTH_TOKEN=YOUR_TOKEN
|
||||
# SENTRY_ORG=vikunja
|
||||
# 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 {saveLastVisited} from '@/helpers/saveLastVisited'
|
||||
|
||||
|
@ -81,7 +81,9 @@ const EditTeamComponent = () => import('@/views/teams/EditTeam.vue')
|
|||
const NewTeamComponent = () => import('@/views/teams/NewTeam.vue')
|
||||
|
||||
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) {
|
||||
// If the user is using their forward/backward keys to navigate, we want to restore the scroll view
|
||||
if (savedPosition) {
|
||||
|
|
Reference in New Issue