chore: move ProjectsNavigationWrapper back to navigation.vue
This commit is contained in:
parent
1d936618fa
commit
65522a57f1
@ -1,28 +0,0 @@
|
||||
<template>
|
||||
<nav class="menu" v-if="favoriteProjects">
|
||||
<ProjectsNavigation :model-value="favoriteProjects" :can-edit-order="false"/>
|
||||
</nav>
|
||||
|
||||
<nav class="menu">
|
||||
<ProjectsNavigation :model-value="projects" :can-edit-order="true"/>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {computed} from 'vue'
|
||||
import {useProjectStore} from '@/stores/projects'
|
||||
import ProjectsNavigation from '@/components/home/ProjectsNavigation.vue'
|
||||
|
||||
const projectStore = useProjectStore()
|
||||
|
||||
const projects = computed(() => projectStore.notArchivedRootProjects
|
||||
.sort((a, b) => a.position - b.position))
|
||||
const favoriteProjects = computed(() => projectStore.favoriteProjects
|
||||
.sort((a, b) => a.position - b.position))
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.menu + .menu{
|
||||
padding-top: math.div($navbar-padding, 2);
|
||||
}
|
||||
</style>
|
@ -49,7 +49,15 @@
|
||||
</nav>
|
||||
|
||||
<Loading variant="small" v-if="projectsLoading"/>
|
||||
<ProjectsNavigationWrapper v-else/>
|
||||
<template v-else>
|
||||
<nav class="menu" v-if="favoriteProjects">
|
||||
<ProjectsNavigation :model-value="favoriteProjects" :can-edit-order="false"/>
|
||||
</nav>
|
||||
|
||||
<nav class="menu">
|
||||
<ProjectsNavigation :model-value="projects" :can-edit-order="true"/>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<PoweredByLink/>
|
||||
</aside>
|
||||
@ -64,12 +72,17 @@ import Loading from '@/components/misc/loading.vue'
|
||||
|
||||
import {useBaseStore} from '@/stores/base'
|
||||
import {useProjectStore} from '@/stores/projects'
|
||||
import ProjectsNavigationWrapper from '@/components/home/ProjectsNavigationWrapper.vue'
|
||||
import ProjectsNavigation from '@/components/home/ProjectsNavigation.vue'
|
||||
|
||||
const baseStore = useBaseStore()
|
||||
const projectStore = useProjectStore()
|
||||
const menuActive = computed(() => baseStore.menuActive)
|
||||
const projectsLoading = computed(() => projectStore.isLoading)
|
||||
|
||||
const projects = computed(() => projectStore.notArchivedRootProjects
|
||||
.sort((a, b) => a.position - b.position))
|
||||
const favoriteProjects = computed(() => projectStore.favoriteProjects
|
||||
.sort((a, b) => a.position - b.position))
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -126,4 +139,8 @@ const projectsLoading = computed(() => projectStore.isLoading)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu + .menu{
|
||||
padding-top: math.div($navbar-padding, 2);
|
||||
}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user