fix: list view route
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
kolaente 2022-11-13 22:44:01 +01:00
parent 184aaaa955
commit 88d64def93
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
7 changed files with 11 additions and 11 deletions

View File

@ -33,7 +33,7 @@
<quick-actions/> <quick-actions/>
<router-view :route="routeWithModal" v-slot="{ Component }"> <router-view :route="routeWithModal" v-slot="{ Component }">
<keep-alive :include="['project.project', 'project.gantt', 'project.table', 'project.kanban']"> <keep-alive :include="['project.list', 'project.gantt', 'project.table', 'project.kanban']">
<component :is="Component"/> <component :is="Component"/>
</keep-alive> </keep-alive>
</router-view> </router-view>

View File

@ -10,9 +10,9 @@
:title="$t('keyboardShortcuts.project.switchToProjectView')" :title="$t('keyboardShortcuts.project.switchToProjectView')"
class="switch-view-button" class="switch-view-button"
:class="{'is-active': viewName === 'project'}" :class="{'is-active': viewName === 'project'}"
:to="{ name: 'project.project', params: { projectId } }" :to="{ name: 'project.list', params: { projectId } }"
> >
{{ $t('project.project.title') }} {{ $t('project.list.title') }}
</BaseButton> </BaseButton>
<BaseButton <BaseButton
v-shortcut="'g g'" v-shortcut="'g g'"

View File

@ -20,7 +20,7 @@
<span> <span>
<router-link <router-link
v-if="showProject && taskProject !== null" v-if="showProject && taskProject !== null"
:to="{ name: 'project.project', params: { projectId: task.projectId } }" :to="{ name: 'project.list', params: { projectId: task.projectId } }"
class="task-project" class="task-project"
:class="{'mr-2': task.hexColor !== ''}" :class="{'mr-2': task.hexColor !== ''}"
v-tooltip="$t('task.detail.belongsToProject', {project: taskProject.title})"> v-tooltip="$t('task.detail.belongsToProject', {project: taskProject.title})">
@ -105,7 +105,7 @@
<router-link <router-link
v-if="!showProject && currentProject.id !== task.projectId && taskProject !== null" v-if="!showProject && currentProject.id !== task.projectId && taskProject !== null"
:to="{ name: 'project.project', params: { projectId: task.projectId } }" :to="{ name: 'project.list', params: { projectId: task.projectId } }"
class="task-project" class="task-project"
v-tooltip="$t('task.detail.belongsToProject', {project: taskProject.title})" v-tooltip="$t('task.detail.belongsToProject', {project: taskProject.title})"
> >

View File

@ -2,7 +2,7 @@ import type { IProject } from '@/modelTypes/IProject'
type ProjectView = Record<IProject['id'], string> type ProjectView = Record<IProject['id'], string>
const DEFAULT_PROJECT_VIEW = 'project.project' as const const DEFAULT_PROJECT_VIEW = 'project.list' as const
/** /**
* Save the current project view to local storage * Save the current project view to local storage

View File

@ -364,14 +364,14 @@ const router = createRouter({
return { return {
name: router.hasRoute(savedProjectView) name: router.hasRoute(savedProjectView)
? savedProjectView ? savedProjectView
: 'project.project', : 'project.list',
params: {projectId: to.params.projectId}, params: {projectId: to.params.projectId},
} }
}, },
}, },
{ {
path: '/projects/:projectId/project', path: '/projects/:projectId/list',
name: 'project.project', name: 'project.list',
component: ProjectList, component: ProjectList,
beforeEnter: (to) => saveProjectView(to.params.projectId, to.name), beforeEnter: (to) => saveProjectView(to.params.projectId, to.name),
props: route => ({ projectId: Number(route.params.projectId as string) }), props: route => ({ projectId: Number(route.params.projectId as string) }),

View File

@ -260,7 +260,7 @@ function searchTasks() {
} }
router.push({ router.push({
name: 'project.project', name: 'project.list',
query: {search: searchTerm.value}, query: {search: searchTerm.value},
}) })
} }

View File

@ -65,7 +65,7 @@ function useAuth() {
errorMessage.value = '' errorMessage.value = ''
if (authLinkShare.value) { if (authLinkShare.value) {
// FIXME: push to 'project.project' since authenticated? // FIXME: push to 'project.list' since authenticated?
return return
} }