Merge pull request #42507 from nextcloud/fix/files/42460/breadcrumb-conditional-rendering

Fix/files/42460/breadcrumb conditional rendering
pull/42566/head
Eduardo Morales 5 months ago committed by GitHub
commit 2e8787462d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,7 +30,8 @@
v-bind="section"
dir="auto"
:to="section.to"
:title="titleForSection(section)"
:title="titleForSection(index, section)"
:aria-description="ariaForSection(index, section)"
@click.native="onClick(section.to)">
<template v-if="index === 0" #icon>
<Home :size="20"/>
@ -132,11 +133,20 @@ export default defineComponent({
}
},
titleForSection(section) {
titleForSection(index, section) {
if (section?.to?.query?.dir === this.$route.query.dir) {
return t('files', 'Reload current directory')
} else if (index === 0) {
return t('files', 'Go to the "{dir}" directory', section)
}
return t('files', 'Go to the "{dir}" directory', section)
return null
},
ariaForSection(index, section) {
if (index === section.length - 1) {
return t('files', 'Reload current directory')
}
return null
},
t,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save