fix(files): kept only first and last breadcrumb titles

Signed-off-by: Eduardo Morales <emoral435@gmail.com>
pull/42507/head
Eduardo Morales 2023-12-28 12:21:36 +07:00
parent ac10ea4bc2
commit 2554419805
3 changed files with 16 additions and 6 deletions

@ -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