Merge pull request #43622 from nextcloud/backport/43604/stable28

This commit is contained in:
John Molakvoæ 2024-02-21 18:25:21 +01:00 committed by GitHub
commit c7ad3bbbbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 6 deletions

View file

@ -8,11 +8,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>
@ -24,11 +26,12 @@
</template>
<script>
import { translate as t} from '@nextcloud/l10n'
import { basename } from 'path'
import { translate as t } from '@nextcloud/l10n'
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 Vue from 'vue'
import { useFilesStore } from '../store/files.ts'
@ -41,6 +44,7 @@ export default Vue.extend({
Home,
NcBreadcrumbs,
NcBreadcrumb,
NcIconSvgWrapper,
},
props: {
@ -81,6 +85,7 @@ export default Vue.extend({
exact: true,
name: this.getDirDisplayName(dir),
to,
icon: this.$navigation.active?.icon || null,
}
})
},
@ -95,7 +100,7 @@ export default Vue.extend({
},
getDirDisplayName(path) {
if (path === '/') {
return t('files', 'Home')
return this.$navigation?.active?.name || t('files', 'Home')
}
const fileId = 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