File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
src/Umbraco.Web.UI.Client/src
apps/backoffice/components
packages/core/section/section-main-views Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ export class UmbBackofficeHeaderSectionsElement extends UmbLitElement {
5454 ) ;
5555 }
5656
57+ #getSectionName( section : UmbExtensionManifestInitializer < ManifestSection > ) {
58+ return section . manifest ?. meta . label ? this . localize . string ( section . manifest ?. meta . label ) : section . manifest ?. name ;
59+ }
60+
5761 #getSectionPath( manifest : ManifestSection | undefined ) {
5862 return `section/${ manifest ?. meta . pathname } ` ;
5963 }
@@ -108,12 +112,10 @@ export class UmbBackofficeHeaderSectionsElement extends UmbLitElement {
108112 ?active= "${ this . _currentSectionAlias === section . alias } "
109113 @click = ${ ( event : PointerEvent ) => this . #onSectionClick( event , section . manifest ) }
110114 href= "${ this . #getSectionPath( section . manifest ) } "
111- label = "${ ifDefined (
112- section . manifest ?. meta . label
113- ? this . localize . string ( section . manifest ?. meta . label )
114- : section . manifest ?. name ,
115- ) } "
116- data-mark = "section-link:${ section . alias } " > </ uui- tab>
115+ label = "${ ifDefined ( this . #getSectionName( section ) ) } "
116+ data-mark = "section-link:${ section . alias } "
117+ > ${ this . #getSectionName( section ) } </ uui- tab
118+ >
117119 ` ,
118120 ) }
119121 </ uui- tab- group>
Original file line number Diff line number Diff line change @@ -111,6 +111,10 @@ export class UmbSectionMainViewElement extends UmbLitElement {
111111 : nothing ;
112112 }
113113
114+ #getDashboardName( dashboard : ManifestDashboard ) {
115+ return dashboard . meta ?. label ? this . localize . string ( dashboard . meta . label ) : ( dashboard . name ?? dashboard . alias ) ;
116+ }
117+
114118 #renderDashboards( ) {
115119 // Only show dashboards if there are more than one dashboard or if there are both dashboards and views
116120 return ( this . _dashboards . length > 0 && this . _views . length > 0 ) || this . _dashboards . length > 1
@@ -124,10 +128,10 @@ export class UmbSectionMainViewElement extends UmbLitElement {
124128 return html `
125129 <uui- tab
126130 href= "${ this . _routerPath } /${ dashboardPath } "
127- label = "${ dashboard . meta . label
128- ? this . localize . string ( dashboard . meta . label )
129- : ( dashboard . name ?? dashboard . alias ) } "
130- ?active = " ${ isActive } " > < / uui - tab >
131+ label = "${ this . #getDashboardName ( dashboard ) } "
132+ ?active = " ${ isActive } "
133+ > ${ this . #getDashboardName ( dashboard ) } < / uui - tab
134+ >
131135 ` ;
132136 } ) }
133137 </ uui- tab- group>
You can’t perform that action at this time.
0 commit comments