Skip to content

Commit

Permalink
fix: changed text alignment and icon logic
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 Mar 16, 2024
1 parent 6ac1463 commit a2222a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
13 changes: 8 additions & 5 deletions apps/files/src/components/BreadCrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
:aria-description="ariaForSection(section)"
@click.native="onClick(section.to)">
<template v-if="index === 0" #icon>
<NcIconSvgWrapper v-if="section.icon" :size="20" :svg="section.icon" />
<Home v-else :size="20"/>
<NcIconSvgWrapper :size="20"
:svg="viewIcon" />
</template>
</NcBreadcrumb>

Expand All @@ -28,7 +28,7 @@
<script>
import { basename } from 'path'
import { translate as t } from '@nextcloud/l10n'
import Home from 'vue-material-design-icons/Home.vue'
import homeSvg from '@mdi/svg/svg/home.svg?raw'
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'
Expand All @@ -41,7 +41,6 @@ export default Vue.extend({
name: 'BreadCrumbs',
components: {
Home,
NcBreadcrumbs,
NcBreadcrumb,
NcIconSvgWrapper,
Expand Down Expand Up @@ -85,10 +84,14 @@ export default Vue.extend({
exact: true,
name: this.getDirDisplayName(dir),
to,
icon: this.$navigation.active?.icon || null,
}
})
},
// used to show the views icon for the first breadcrumb
viewIcon() {
return this.currentView?.icon ?? homeSvg
}
},
methods: {
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 a2222a6

Please sign in to comment.