feat(navigation): correctly show child projects

This commit is contained in:
kolaente 2023-03-27 11:05:22 +02:00
parent 3ad948305f
commit b188d40d3c
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 15 additions and 7 deletions

View File

@ -30,6 +30,7 @@
class="list-menu loader-container is-loading-small"
:class="{'is-loading': projectUpdating[p.id]}"
>
<section>
<BaseButton
:to="{ name: 'project.index', params: { projectId: p.id} }"
class="list-menu-link"
@ -61,14 +62,15 @@
</template>
</ProjectSettingsDropdown>
<span class="list-setting-spacer" v-else></span>
</section>
<ProjectsNavigation
v-if="p.childProjects.length > 0"
:projects="p.childProjects"
/>
</li>
</template>
</draggable>
<!-- <ProjectsNavigation-->
<!-- v-if="projects.childProjects.length > 0"-->
<!-- :projects="projects.childProjects"-->
<!-- />-->
</template>
<script lang="ts" setup>

View File

@ -22,6 +22,7 @@ export default class ProjectModel extends AbstractModel<IProject> implements IPr
subscription: ISubscription = null
position = 0
backgroundBlurHash = ''
childProjects = []
created: Date = null
updated: Date = null
@ -44,6 +45,8 @@ export default class ProjectModel extends AbstractModel<IProject> implements IPr
if (typeof this.subscription !== 'undefined' && this.subscription !== null) {
this.subscription = new SubscriptionModel(this.subscription)
}
this.childProjects = this.childProjects.map(p => new ProjectModel(p))
this.created = new Date(this.created)
this.updated = new Date(this.updated)

View File

@ -15,7 +15,7 @@
}
.menu-list {
li {
li > section {
height: 44px;
display: flex;
align-items: center;
@ -38,7 +38,10 @@
opacity: 1;
}
}
}
li > ul {
margin: 0 0 0 var(--menu-nested-list-margin);
}
.menu-item-icon {
@ -67,7 +70,7 @@
}
.list-menu-link,
li > a {
li > section > a {
color: $vikunja-nav-color;
padding: 0.75rem .5rem 0.75rem ($navbar-padding * 1.5 - 1.75rem);
transition: all 0.2s ease;