diff --git a/apps/files/src/components/FilesNavigationListItem.vue b/apps/files/src/components/FilesNavigationListItem.vue index f5f2bf01156ce..deaf5e0174869 100644 --- a/apps/files/src/components/FilesNavigationListItem.vue +++ b/apps/files/src/components/FilesNavigationListItem.vue @@ -7,7 +7,7 @@ import type { IView } from '@nextcloud/files' import { getCanonicalLocale, getLanguage } from '@nextcloud/l10n' -import { computed, onMounted, ref } from 'vue' +import { computed, inject, onMounted, ref } from 'vue' import NcAppNavigationItem from '@nextcloud/vue/components/NcAppNavigationItem' import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper' import { useVisibleViews } from '../composables/useViews.ts' @@ -62,6 +62,8 @@ const sortedChildViews = computed(() => childViews.value.slice().sort((a, b) => return collator.compare(a.name, b.name) })) const hasChildViews = computed(() => childViews.value.length > 0) +const activeViewId = inject('currentNavigationView', ref(undefined)) +const isActiveView = computed(() => activeViewId.value.id === props.view.id) const navigationRoute = computed(() => { if (props.view.params) { @@ -138,6 +140,7 @@ export default {