File tree Expand file tree Collapse file tree 6 files changed +19
-0
lines changed
Expand file tree Collapse file tree 6 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -47,4 +47,5 @@ public class NavigationMenuItemModel
4747 = new List < NavigationMenuTranslationModel > ( ) ;
4848
4949 public bool IsInternalLink { get ; set ; }
50+ public string Icon { get ; set ; }
5051}
Original file line number Diff line number Diff line change @@ -35,4 +35,5 @@ public class NavigationMenuTemplateItemModel
3535 public int ? RelatedTemplateItemId { get ; set ; }
3636 public List < NavigationMenuTranslationModel > Translations { get ; set ; }
3737 = new List < NavigationMenuTranslationModel > ( ) ;
38+ public string Icon { get ; set ; }
3839}
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ export class NavigationMenuTemplateItemModel {
1818 link : string ;
1919 collapsed : boolean ;
2020 translations : NavigationMenuTranslationModel [ ] ;
21+ icon : string ;
2122}
2223
2324export class NavigationMenuItemModel {
@@ -34,6 +35,7 @@ export class NavigationMenuItemModel {
3435 securityGroupsIds : number [ ] ;
3536 translations : NavigationMenuTranslationModel [ ] ;
3637 isInternalLink : boolean = true ;
38+ icon : string ;
3739}
3840
3941export class NavigationMenuTranslationModel {
Original file line number Diff line number Diff line change 1515 [id] ="node.e2EId "
1616 (click) ="onClickOnNode() "
1717 >
18+ < mat-icon *ngIf ="node.icon " class ="menu-icon "> {{ node.icon }}</ mat-icon >
1819 {{ node.name }}
1920 </ a >
2021 < a mat-button
2425 [href] ="node.link "
2526 (click) ="onClickOnNode() "
2627 >
28+ < mat-icon *ngIf ="node.icon " class ="menu-icon "> {{ node.icon }}</ mat-icon >
2729 {{node.name }}
2830 </ a >
2931 </ ng-container >
3739 matTreeNodeToggle
3840 [id] ="node.e2EId "
3941 >
42+ < mat-icon *ngIf ="node.icon " class ="menu-icon " style ="vertical-align: middle; margin-right: 8px; "> {{ node.icon }}</ mat-icon >
4043 < span style =""> {{node.name}}</ span >
4144 </ a >
4245 </ mat-expansion-panel-header >
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ interface MenuNode {
1717 position : number ;
1818 isInternalLink : boolean ;
1919 guards : Array < string > ;
20+ icon ?: string ;
2021}
2122
2223@AutoUnsubscribe ( )
Original file line number Diff line number Diff line change @@ -13,6 +13,17 @@ <h3 mat-dialog-title>{{'Edit menu entry' | translate}}</h3>
1313 [multiple] ="true " >
1414 </ mtx-select >
1515 </ mat-form-field >
16+ < mat-form-field >
17+ < mat-label > {{ 'Icon' | translate }}</ mat-label >
18+ < input
19+ matInput
20+ type ="text "
21+ id ="editIconInput "
22+ name ="editIconInput "
23+ [(ngModel)] ="item.icon "
24+ placeholder ="e.g., home, settings, dashboard "
25+ >
26+ </ mat-form-field >
1627 < div class ="d-flex flex-row align-items-center need-wrapper "
1728 *ngIf ="item.type === menuItemType.CustomLink || item.type === menuItemType.Link ">
1829 < mat-form-field >
You can’t perform that action at this time.
0 commit comments