Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions apps/files/src/components/BreadCrumbs.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<template>
<NcBreadcrumbs data-cy-files-content-breadcrumbs>
<NcBreadcrumbs
data-cy-files-content-breadcrumbs
:aria-label="t('files', 'Current directory path')">
<!-- Current path sections -->
<NcBreadcrumb v-for="(section, index) in sections"
:key="section.dir"
:aria-label="ariaLabel(section)"
:title="ariaLabel(section)"
v-bind="section"
dir="auto"
:to="section.to"
:title="titleForSection(section)"
@click.native="onClick(section.to)">
<template v-if="index === 0" #icon>
<Home :size="20" />
<Home :size="20"/>
</template>
</NcBreadcrumb>

Expand All @@ -20,6 +23,7 @@
</template>

<script>
import { translate as t} from '@nextcloud/l10n'
import { basename } from 'path'
import Home from 'vue-material-design-icons/Home.vue'
import NcBreadcrumb from '@nextcloud/vue/dist/Components/NcBreadcrumb.js'
Expand Down Expand Up @@ -104,12 +108,14 @@ export default Vue.extend({
}
},

ariaLabel(section) {
titleForSection(section) {
if (section?.to?.query?.dir === this.$route.query.dir) {
return t('files', 'Reload current directory')
}
return t('files', 'Go to the "{dir}" directory', section)
},

t,
},
})
</script>
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.