Merge pull request #43604 from nextcloud/enh/breadcrumbs/43569/apply-breadcrumbs-logic-from-personal-files-to-all-files-view

This commit is contained in:
John Molakvoæ 2024-02-16 17:08:25 +01:00 committed by GitHub
commit 448a40bd22
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View file

@ -30,11 +30,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>
@ -53,6 +55,7 @@ import { basename } from 'path'
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 { defineComponent } from 'vue'
import { useFilesStore } from '../store/files.ts'
@ -65,6 +68,7 @@ export default defineComponent({
Home,
NcBreadcrumbs,
NcBreadcrumb,
NcIconSvgWrapper,
},
props: {
@ -105,6 +109,7 @@ export default defineComponent({
exact: true,
name: this.getDirDisplayName(dir),
to,
icon: this.$navigation.active?.icon || null,
}
})
},
@ -119,7 +124,7 @@ export default defineComponent({
},
getDirDisplayName(path: string): string {
if (path === '/') {
return t('files', 'Home')
return this.$navigation?.active?.name || t('files', 'Home')
}
const fileId: number | undefined = this.getFileIdFromPath(path)

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long