Skip to content

Commit 1c35f29

Browse files
authored
Merge pull request #43916 from nextcloud/backport/43876/stable28
2 parents 6ac1463 + a2222a6 commit 1c35f29

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

apps/files/src/components/BreadCrumbs.vue

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
:aria-description="ariaForSection(section)"
1414
@click.native="onClick(section.to)">
1515
<template v-if="index === 0" #icon>
16-
<NcIconSvgWrapper v-if="section.icon" :size="20" :svg="section.icon" />
17-
<Home v-else :size="20"/>
16+
<NcIconSvgWrapper :size="20"
17+
:svg="viewIcon" />
1818
</template>
1919
</NcBreadcrumb>
2020

@@ -28,7 +28,7 @@
2828
<script>
2929
import { basename } from 'path'
3030
import { translate as t } from '@nextcloud/l10n'
31-
import Home from 'vue-material-design-icons/Home.vue'
31+
import homeSvg from '@mdi/svg/svg/home.svg?raw'
3232
import NcBreadcrumb from '@nextcloud/vue/dist/Components/NcBreadcrumb.js'
3333
import NcBreadcrumbs from '@nextcloud/vue/dist/Components/NcBreadcrumbs.js'
3434
import NcIconSvgWrapper from '@nextcloud/vue/dist/Components/NcIconSvgWrapper.js'
@@ -41,7 +41,6 @@ export default Vue.extend({
4141
name: 'BreadCrumbs',
4242
4343
components: {
44-
Home,
4544
NcBreadcrumbs,
4645
NcBreadcrumb,
4746
NcIconSvgWrapper,
@@ -85,10 +84,14 @@ export default Vue.extend({
8584
exact: true,
8685
name: this.getDirDisplayName(dir),
8786
to,
88-
icon: this.$navigation.active?.icon || null,
8987
}
9088
})
9189
},
90+
91+
// used to show the views icon for the first breadcrumb
92+
viewIcon() {
93+
return this.currentView?.icon ?? homeSvg
94+
}
9295
},
9396
9497
methods: {

dist/files-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)