|
221 | 221 | class="chevron float-end me-1" |
222 | 222 | (click)="toggleMenuItem('macro')"></fa-icon> |
223 | 223 | </div> |
224 | | - <ul [@toggler]="this.sideMenuState.macro.animation"> |
225 | | - <ng-container *ngTemplateOutlet="macroTree; context: { $implicit: state.macroTree, depth: 0 }"></ng-container> |
| 224 | + <ul class="sidebar__macro-tree" [@toggler]="this.sideMenuState.macro.animation"> |
| 225 | + <ng-container *ngTemplateOutlet="macroTree; context: { $implicit: state.macroTree }"></ng-container> |
226 | 226 | </ul> |
227 | 227 | </li> |
228 | 228 | </ul> |
229 | 229 | </li> |
230 | 230 | </ul> |
231 | 231 |
|
232 | | -<ng-template #macroTree let-nodes let-depth="depth"> |
| 232 | +<ng-template #macroTree let-nodes> |
233 | 233 | <ng-container *ngFor="let node of nodes"> |
234 | 234 | <li *ngIf="node.type === 'macro'" class="sidebar__macro-tree-item"> |
235 | | - <div class="sidebar__macro-tree-entry" [style.--macro-depth]="depth" [routerLinkActive]="['active']"> |
| 235 | + <div class="sidebar__macro-tree-entry" [routerLinkActive]="['active']"> |
236 | 236 | <a [routerLink]="['/macro', node.macro.id]" |
237 | 237 | [class.disabled]="state.updatingFirmware">{{ getMacroDisplayName(node) }}</a> |
238 | 238 | <span class="sidebar__macro_count badge rounded-pill" |
|
243 | 243 | </li> |
244 | 244 | <li *ngIf="node.type === 'group'" class="sidebar__macro-tree-item"> |
245 | 245 | <div class="sidebar__macro-tree-entry sidebar__macro-group" |
246 | | - [style.--macro-depth]="depth" |
247 | 246 | (click)="toggleMacroGroup(node.path)"> |
248 | | - {{ node.label }} |
| 247 | + {{ node.label }}… |
249 | 248 | <fa-icon [icon]="getMacroGroupArrowIcon(node.path)" |
250 | 249 | class="sidebar__macro-group-arrow"></fa-icon> |
251 | 250 | </div> |
252 | | - <ul [@toggler]="getMacroGroupState(node.path).animation"> |
253 | | - <ng-container *ngTemplateOutlet="macroTree; context: { $implicit: node.children, depth: depth + 1 }"></ng-container> |
| 251 | + <ul class="sidebar__macro-group-children" [@toggler]="getMacroGroupState(node.path).animation"> |
| 252 | + <ng-container *ngTemplateOutlet="macroTree; context: { $implicit: node.children }"></ng-container> |
254 | 253 | </ul> |
255 | 254 | </li> |
256 | 255 | </ng-container> |
|
0 commit comments