aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-16 17:08:25 +0100
committerGitHub <noreply@github.com>2024-02-16 17:08:25 +0100
commit448a40bd22705efc84f13ca1eee5289a68e2e610 (patch)
tree8144f24b406dcf4e5ea2f73731bd050cf5530739 /apps/files
parentbb87232882f99c025ef224fb24aefd240b7d0c96 (diff)
parente7bd9f0912e7735c22ac2d9c32781a9e57de023c (diff)
downloadnextcloud-server-448a40bd22705efc84f13ca1eee5289a68e2e610.tar.gz
nextcloud-server-448a40bd22705efc84f13ca1eee5289a68e2e610.zip
Merge pull request #43604 from nextcloud/enh/breadcrumbs/43569/apply-breadcrumbs-logic-from-personal-files-to-all-files-view
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/components/BreadCrumbs.vue9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/src/components/BreadCrumbs.vue b/apps/files/src/components/BreadCrumbs.vue
index f50a4d14fd8..0975f1a6446 100644
--- a/apps/files/src/components/BreadCrumbs.vue
+++ b/apps/files/src/components/BreadCrumbs.vue
@@ -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)