mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Merge pull request #43604 from nextcloud/enh/breadcrumbs/43569/apply-breadcrumbs-logic-from-personal-files-to-all-files-view
This commit is contained in:
commit
448a40bd22
3 changed files with 10 additions and 5 deletions
|
|
@ -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
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue