Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix: changed text alignment and icon logic #43916

Merged
merged 1 commit into from Mar 16, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 8 additions & 5 deletions apps/files/src/components/BreadCrumbs.vue
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.