-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(edit-content): migrate using the new syntax and signals #30401
- Loading branch information
Showing
4 changed files
with
49 additions
and
47 deletions.
There are no files selected for viewing
11 changes: 4 additions & 7 deletions
11
...rc/app/view/components/dot-navigation/components/dot-nav-icon/dot-nav-icon.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
<i | ||
*ngIf="isFaIcon(icon); else mdIcon" | ||
[style.font-size.px]="18" | ||
class="fa fa-th-list {{ icon }}" | ||
aria-hidden="true"></i> | ||
<ng-template #mdIcon> | ||
@if (isFaIcon(icon)) { | ||
<i [style.font-size.px]="18" class="fa fa-th-list {{ icon }}" aria-hidden="true"></i> | ||
} @else { | ||
<dot-icon [size]="18" [name]="icon.toLocaleLowerCase()" inverted aria-hidden="true"></dot-icon> | ||
</ng-template> | ||
} |
22 changes: 12 additions & 10 deletions
22
.../src/app/view/components/dot-navigation/components/dot-sub-nav/dot-sub-nav.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<ul [class.dot-nav-sub__collapsed]="collapsed" #ul class="dot-nav-sub"> | ||
<li *ngFor="let subItem of data.menuItems" class="dot-nav-sub__item"> | ||
<a | ||
(click)="onItemClick($event, subItem)" | ||
[class.dot-nav-sub__link--active]="subItem.active" | ||
[routerLink]="subItem.menuLink" | ||
[state]="{ menuId: data.id }" | ||
class="dot-nav-sub__link"> | ||
{{ subItem.label }} | ||
</a> | ||
</li> | ||
@for (subItem of data.menuItems; track subItem) { | ||
<li class="dot-nav-sub__item"> | ||
<a | ||
(click)="onItemClick($event, subItem)" | ||
[class.dot-nav-sub__link--active]="subItem.active" | ||
[routerLink]="subItem.menuLink" | ||
[state]="{ menuId: data.id }" | ||
class="dot-nav-sub__link"> | ||
{{ subItem.label }} | ||
</a> | ||
</li> | ||
} | ||
</ul> |
22 changes: 11 additions & 11 deletions
22
core-web/apps/dotcms-ui/src/app/view/components/dot-navigation/dot-navigation.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<nav [class.collapsed]="dotNavigationService.collapsed$ | async" role="navigation"> | ||
@let isCollapsed = $isCollapsed(); | ||
<nav [class.collapsed]="isCollapsed" role="navigation"> | ||
<ul class="dot-nav"> | ||
<li | ||
*ngFor="let item of menu$ | async" | ||
[class.dot-nav__list-item--active]="item.isOpen" | ||
class="dot-nav__list-item"> | ||
<dot-nav-item | ||
(menuClick)="onMenuClick($event)" | ||
(itemClick)="onItemClick($event)" | ||
[data]="item" | ||
[collapsed]="dotNavigationService.collapsed$ | async"></dot-nav-item> | ||
</li> | ||
@for (item of $menu(); track item) { | ||
<li [class.dot-nav__list-item--active]="item.isOpen" class="dot-nav__list-item"> | ||
<dot-nav-item | ||
(menuClick)="onMenuClick($event)" | ||
(itemClick)="onItemClick($event)" | ||
[data]="item" | ||
[collapsed]="isCollapsed" /> | ||
</li> | ||
} | ||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters