feat(navigation): correctly show child projects
This commit is contained in:
parent
3ad948305f
commit
b188d40d3c
@ -30,6 +30,7 @@
|
|||||||
class="list-menu loader-container is-loading-small"
|
class="list-menu loader-container is-loading-small"
|
||||||
:class="{'is-loading': projectUpdating[p.id]}"
|
:class="{'is-loading': projectUpdating[p.id]}"
|
||||||
>
|
>
|
||||||
|
<section>
|
||||||
<BaseButton
|
<BaseButton
|
||||||
:to="{ name: 'project.index', params: { projectId: p.id} }"
|
:to="{ name: 'project.index', params: { projectId: p.id} }"
|
||||||
class="list-menu-link"
|
class="list-menu-link"
|
||||||
@ -61,14 +62,15 @@
|
|||||||
</template>
|
</template>
|
||||||
</ProjectSettingsDropdown>
|
</ProjectSettingsDropdown>
|
||||||
<span class="list-setting-spacer" v-else></span>
|
<span class="list-setting-spacer" v-else></span>
|
||||||
|
</section>
|
||||||
|
<ProjectsNavigation
|
||||||
|
v-if="p.childProjects.length > 0"
|
||||||
|
:projects="p.childProjects"
|
||||||
|
/>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
</draggable>
|
</draggable>
|
||||||
|
|
||||||
<!-- <ProjectsNavigation-->
|
|
||||||
<!-- v-if="projects.childProjects.length > 0"-->
|
|
||||||
<!-- :projects="projects.childProjects"-->
|
|
||||||
<!-- />-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -22,6 +22,7 @@ export default class ProjectModel extends AbstractModel<IProject> implements IPr
|
|||||||
subscription: ISubscription = null
|
subscription: ISubscription = null
|
||||||
position = 0
|
position = 0
|
||||||
backgroundBlurHash = ''
|
backgroundBlurHash = ''
|
||||||
|
childProjects = []
|
||||||
|
|
||||||
created: Date = null
|
created: Date = null
|
||||||
updated: 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) {
|
if (typeof this.subscription !== 'undefined' && this.subscription !== null) {
|
||||||
this.subscription = new SubscriptionModel(this.subscription)
|
this.subscription = new SubscriptionModel(this.subscription)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.childProjects = this.childProjects.map(p => new ProjectModel(p))
|
||||||
|
|
||||||
this.created = new Date(this.created)
|
this.created = new Date(this.created)
|
||||||
this.updated = new Date(this.updated)
|
this.updated = new Date(this.updated)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.menu-list {
|
.menu-list {
|
||||||
li {
|
li > section {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -38,7 +38,10 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
li > ul {
|
||||||
|
margin: 0 0 0 var(--menu-nested-list-margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item-icon {
|
.menu-item-icon {
|
||||||
@ -67,7 +70,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-menu-link,
|
.list-menu-link,
|
||||||
li > a {
|
li > section > a {
|
||||||
color: $vikunja-nav-color;
|
color: $vikunja-nav-color;
|
||||||
padding: 0.75rem .5rem 0.75rem ($navbar-padding * 1.5 - 1.75rem);
|
padding: 0.75rem .5rem 0.75rem ($navbar-padding * 1.5 - 1.75rem);
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user