Skip to content

Commit

Permalink
enh: breadcrumb icon matches nav view icon
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
  • Loading branch information
emoral435 authored and skjnldsv committed Feb 21, 2024
1 parent fdc379b commit 9a10f31
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apps/files/src/components/BreadCrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
v-bind="section"
dir="auto"
:to="section.to"
:icon-text="true"
: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 @@ -25,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 @@ -42,6 +44,7 @@ export default Vue.extend({
Home,
NcBreadcrumbs,
NcBreadcrumb,
NcIconSvgWrapper,
},
props: {
Expand Down Expand Up @@ -82,6 +85,7 @@ export default Vue.extend({
exact: true,
name: this.getDirDisplayName(dir),
to,
icon: this.$navigation.active?.icon || null,
}
})
},
Expand Down

0 comments on commit 9a10f31

Please sign in to comment.