Skip to content

Commit

Permalink
Merge pull request #43622 from nextcloud/backport/43604/stable28
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Feb 21, 2024
2 parents 09c1f0d + 644aeea commit c7ad3bb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions apps/files/src/components/BreadCrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
v-bind="section"
dir="auto"
:to="section.to"
:force-icon-text="true"
:title="titleForSection(index, section)"
:aria-description="ariaForSection(section)"
@click.native="onClick(section.to)">
<template v-if="index === 0" #icon>
<Home :size="20"/>
<NcIconSvgWrapper v-if="section.icon" :size="20" :svg="section.icon" />
<Home v-else :size="20"/>
</template>
</NcBreadcrumb>

Expand All @@ -24,11 +26,12 @@
</template>

<script>
import { translate as t} from '@nextcloud/l10n'
import { basename } from 'path'
import { translate as t } from '@nextcloud/l10n'
import Home from 'vue-material-design-icons/Home.vue'
import NcBreadcrumb from '@nextcloud/vue/dist/Components/NcBreadcrumb.js'
import NcBreadcrumbs from '@nextcloud/vue/dist/Components/NcBreadcrumbs.js'
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
import Vue from 'vue'
import { useFilesStore } from '../store/files.ts'
Expand All @@ -41,6 +44,7 @@ export default Vue.extend({
Home,
NcBreadcrumbs,
NcBreadcrumb,
NcIconSvgWrapper,
},
props: {
Expand Down Expand Up @@ -81,6 +85,7 @@ export default Vue.extend({
exact: true,
name: this.getDirDisplayName(dir),
to,
icon: this.$navigation.active?.icon || null,
}
})
},
Expand All @@ -95,7 +100,7 @@ export default Vue.extend({
},
getDirDisplayName(path) {
if (path === '/') {
return t('files', 'Home')
return this.$navigation?.active?.name || t('files', 'Home')
}
const fileId = this.getFileIdFromPath(path)
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.

0 comments on commit c7ad3bb

Please sign in to comment.