fix: don't show child projects when the project is only a favorite

This commit is contained in:
kolaente 2023-04-03 11:18:10 +02:00
parent b567146d69
commit 0a17df87e9
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 7 additions and 4 deletions

View File

@ -22,6 +22,7 @@
<ProjectsNavigationItem
:project="project"
:is-loading="projectUpdating[project.id]"
:can-collapse="canCollapse"
/>
</template>
</draggable>
@ -42,6 +43,7 @@ import {useProjectStore} from '@/stores/projects'
const props = defineProps<{
modelValue?: IProject[],
canEditOrder: boolean,
canCollapse?: boolean,
}>()
const emit = defineEmits(['update:modelValue'])

View File

@ -6,7 +6,7 @@
>
<section>
<BaseButton
v-if="childProjects?.length > 0"
v-if="canCollapse && childProjects?.length > 0"
@click="childProjectsOpen = !childProjectsOpen"
class="collapse-project-button"
>
@ -46,7 +46,7 @@
<span class="list-setting-spacer" v-else></span>
</section>
<ProjectsNavigation
v-if="childProjectsOpen"
v-if="childProjectsOpen && canCollapse"
v-model="childProjects"
:can-edit-order="true"
/>
@ -69,6 +69,7 @@ import ProjectsNavigation from '@/components/home/ProjectsNavigation.vue'
const props = defineProps<{
project: IProject,
isLoading?: boolean,
canCollapse?: boolean,
}>()
const projectStore = useProjectStore()

View File

@ -51,11 +51,11 @@
<Loading variant="small" v-if="projectsLoading"/>
<template v-else>
<nav class="menu" v-if="favoriteProjects">
<ProjectsNavigation :model-value="favoriteProjects" :can-edit-order="false"/>
<ProjectsNavigation :model-value="favoriteProjects" :can-edit-order="false" :can-collapse="false"/>
</nav>
<nav class="menu">
<ProjectsNavigation :model-value="projects" :can-edit-order="true"/>
<ProjectsNavigation :model-value="projects" :can-edit-order="true" :can-collapse="true"/>
</nav>
</template>