]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html
Fix top menu dropdown
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / misc / top-menu-dropdown.component.html
CommitLineData
d363ef53
K
1<div class="sub-menu" [ngClass]="{ 'no-scroll': isModalOpened }">
2 <ng-container *ngFor="let menuEntry of menuEntries; index as id">
ddb83e49 3
dfe3f7b7 4 <a *ngIf="menuEntry.routerLink && isDisplayed(menuEntry)" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings">{{ menuEntry.label }}</a>
ddb83e49 5
dfe3f7b7 6 <div *ngIf="!menuEntry.routerLink && isDisplayed(menuEntry)" ngbDropdown class="parent-entry"
837fe4f3 7 #dropdown="ngbDropdown" autoClose="true">
80bfd33c 8 <span
805d6a35
C
9 *ngIf="isInSmallView"
10 tabindex=0
11 [ngClass]="{ active: !!suffixLabels[menuEntry.label] }"
12 (click)="openModal(id)" (keydown.enter)="openModal(id)"
ed5bb517 13 role="button" class="title-page title-page-settings">
d363ef53 14 <ng-container i18n>{{ menuEntry.label }}</ng-container>
d363ef53
K
15 </span>
16
17 <span
18 *ngIf="!isInSmallView"
ed5bb517
K
19 tabindex=0
20 [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" ngbDropdownAnchor
21 (click)="dropdownAnchorClicked(dropdown)" (keydown.enter)="dropdownAnchorClicked(dropdown)"
22 role="button" class="title-page title-page-settings"
80bfd33c 23 >
ddb83e49 24 <ng-container i18n>{{ menuEntry.label }}</ng-container>
ddb83e49
C
25 </span>
26
27 <div ngbDropdownMenu>
dfe3f7b7
K
28 <ng-container *ngFor="let menuChild of menuEntry.children">
29 <a *ngIf="isDisplayed(menuChild)" class="dropdown-item"
837fe4f3 30 [ngClass]="{ icon: hasIcons }"
dfe3f7b7
K
31 [routerLink]="menuChild.routerLink">
32 <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>
a55052c9 33
dfe3f7b7
K
34 {{ menuChild.label }}
35 </a>
36 </ng-container>
ddb83e49
C
37 </div>
38 </div>
ddb83e49
C
39 </ng-container>
40</div>
d363ef53
K
41
42<ng-template #modal let-close="close" let-dismiss="dismiss">
43 <div class="modal-body">
44 <ng-container *ngFor="let menuEntry of menuEntries; index as id">
45 <div [ngClass]="{ hidden: id !== currentMenuEntryIndex }">
dfe3f7b7
K
46 <ng-container *ngFor="let menuChild of menuEntry.children">
47 <a *ngIf="isDisplayed(menuChild)"
48 [ngClass]="{ icon: hasIcons }"
49 [routerLink]="menuChild.routerLink" routerLinkActive="active" (click)="dismissOtherModals()">
50 <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>
d363ef53 51
dfe3f7b7
K
52 {{ menuChild.label }}
53 </a>
54 </ng-container>
d363ef53
K
55 </div>
56 </ng-container>
57 </div>
58</ng-template>