Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: breadcrumbs navigation broken for non-english language #1066

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions src/containers/DefaultContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
ProfileEditModal,
SnapshotModal,
AppSidebar,
AppAside,

Check failure on line 50 in src/containers/DefaultContainer.vue

View workflow job for this annotation

GitHub Actions / lint

The "AppAside" component has been registered but not used
Breadcrumb,
DefaultHeaderProfileDropdown,

Check failure on line 52 in src/containers/DefaultContainer.vue

View workflow job for this annotation

GitHub Actions / lint

The "DefaultHeaderProfileDropdown" component has been registered but not used
SidebarForm,
SidebarFooter,
SidebarHeader,
Expand Down Expand Up @@ -172,12 +172,17 @@
subSectionUuid,
subSectionLabel,
) {
let sectionName = this.$route.meta.sectionName;
let sectionLabel = this.$t(this.$route.meta.i18n);
let sectionPath = this.$route.meta.sectionPath;
if (crumbName && subSectionName && subSectionUuid && subSectionLabel) {
return [
{ path: '', name: this.$t('message.home') },
{ path: sectionPath, name: sectionLabel },
{ path: '', name: 'Home', meta: { label: this.$t('message.home') } },
{
path: sectionPath,
name: sectionName,
meta: { label: sectionLabel },
},
{
name: subSectionName,
params: { uuid: subSectionUuid },
Expand All @@ -187,14 +192,22 @@
];
} else if (crumbName) {
return [
{ path: '', name: this.$t('message.home') },
{ path: sectionPath, name: sectionLabel },
{ path: '', name: 'Home', meta: { label: this.$t('message.home') } },
{
path: sectionPath,
name: sectionName,
meta: { label: sectionLabel },
},
{ name: crumbName, active: true },
];
} else {
return [
{ path: '', name: this.$t('message.home') },
{ path: sectionPath, name: sectionLabel },
{ path: '', name: 'Home', meta: { label: this.$t('message.home') } },
{
path: sectionPath,
name: sectionName,
meta: { label: sectionLabel },
},
];
}
},
Expand Down
Loading
Loading