2020 -
2121 -->
2222<template >
23- <NcAppNavigation data-cy-files-navigation
24- :aria-label =" t('files', 'Files')" >
25- <template #list >
26- <NcAppNavigationItem v-for =" view in parentViews"
27- :key =" view.id"
28- :allow-collapse =" true"
29- :data-cy-files-navigation-item =" view.id"
30- :exact =" useExactRouteMatching(view)"
31- :icon =" view.iconClass"
32- :name =" view.name"
33- :open =" isExpanded(view)"
34- :pinned =" view.sticky"
35- :to =" generateToNavigation(view)"
36- @update:open =" onToggleExpand(view)" >
37- <!-- Sanitized icon as svg if provided -->
38- <NcIconSvgWrapper v-if =" view.icon" slot =" icon" :svg =" view.icon" />
39-
40- <!-- Child views if any -->
41- <NcAppNavigationItem v-for =" child in childViews[view.id]"
42- :key =" child.id"
43- :data-cy-files-navigation-item =" child.id"
44- :exact-path =" true"
45- :icon =" child.iconClass"
46- :name =" child.name"
47- :to =" generateToNavigation(child)" >
23+ <Fragment >
24+ <NcAppNavigation data-cy-files-navigation
25+ :aria-label =" t('files', 'Files')" >
26+ <template #list >
27+ <NcAppNavigationItem v-for =" view in parentViews"
28+ :key =" view.id"
29+ :allow-collapse =" true"
30+ :data-cy-files-navigation-item =" view.id"
31+ :exact =" useExactRouteMatching(view)"
32+ :icon =" view.iconClass"
33+ :name =" view.name"
34+ :open =" isExpanded(view)"
35+ :pinned =" view.sticky"
36+ :to =" generateToNavigation(view)"
37+ @update:open =" onToggleExpand(view)" >
4838 <!-- Sanitized icon as svg if provided -->
49- <NcIconSvgWrapper v-if =" child.icon" slot =" icon" :svg =" child.icon" />
50- </NcAppNavigationItem >
51- </NcAppNavigationItem >
52- </template >
53-
54- <!-- Non-scrollable navigation bottom elements -->
55- <template #footer >
56- <ul class =" app-navigation-entry__settings" >
57- <!-- User storage usage statistics -->
58- <NavigationQuota />
59-
60- <!-- Files settings modal toggle-->
61- <NcAppNavigationItem :aria-label =" t('files', 'Open the files app settings')"
62- :name =" t('files', 'Files settings')"
63- data-cy-files-navigation-settings-button
64- @click.prevent.stop =" openSettings" >
65- <Cog slot =" icon" :size =" 20" />
39+ <NcIconSvgWrapper v-if =" view.icon" slot =" icon" :svg =" view.icon" />
40+
41+ <!-- Child views if any -->
42+ <NcAppNavigationItem v-for =" child in childViews[view.id]"
43+ :key =" child.id"
44+ :data-cy-files-navigation-item =" child.id"
45+ :exact-path =" true"
46+ :icon =" child.iconClass"
47+ :name =" child.name"
48+ :to =" generateToNavigation(child)" >
49+ <!-- Sanitized icon as svg if provided -->
50+ <NcIconSvgWrapper v-if =" child.icon" slot =" icon" :svg =" child.icon" />
51+ </NcAppNavigationItem >
6652 </NcAppNavigationItem >
67- </ul >
68- </template >
53+ </template >
54+
55+ <!-- Non-scrollable navigation bottom elements -->
56+ <template #footer >
57+ <ul class =" app-navigation-entry__settings" >
58+ <!-- User storage usage statistics -->
59+ <NavigationQuota />
60+
61+ <!-- Files settings modal toggle-->
62+ <NcAppNavigationItem :aria-label =" t('files', 'Open the files app settings')"
63+ :name =" t('files', 'Files settings')"
64+ data-cy-files-navigation-settings-button
65+ @click.prevent.stop =" openSettings" >
66+ <Cog slot =" icon" :size =" 20" />
67+ </NcAppNavigationItem >
68+ </ul >
69+ </template >
70+ </NcAppNavigation >
6971
7072 <!-- Settings modal-->
7173 <SettingsModal :open =" settingsOpened"
7274 data-cy-files-navigation-settings
7375 @close =" onSettingsClose" />
74- </NcAppNavigation >
76+ </Fragment >
7577</template >
7678
7779<script lang="ts">
7880import type { View } from ' @nextcloud/files'
7981
82+ import { Fragment } from ' vue-frag'
83+
8084import { emit } from ' @nextcloud/event-bus'
8185import { translate } from ' @nextcloud/l10n'
8286import Cog from ' vue-material-design-icons/Cog.vue'
@@ -94,6 +98,7 @@ export default {
9498
9599 components: {
96100 Cog ,
101+ Fragment ,
97102 NavigationQuota ,
98103 NcAppNavigation ,
99104 NcAppNavigationItem ,
0 commit comments