aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-07-02 09:00:17 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-02 09:22:59 +0200
commit0a4cb95c98d4b6f7c3e404535996f706c659e13e (patch)
tree4a5ac666cfcda7e4bd15a5fa07785d96e8f31738 /client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html
parentc7b836303c48861cc1681006fd4630d286a3b200 (diff)
downloadPeerTube-0a4cb95c98d4b6f7c3e404535996f706c659e13e.tar.gz
PeerTube-0a4cb95c98d4b6f7c3e404535996f706c659e13e.tar.zst
PeerTube-0a4cb95c98d4b6f7c3e404535996f706c659e13e.zip
simplify navigation within most admin menus
Diffstat (limited to 'client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html')
-rw-r--r--client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html50
1 files changed, 50 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html
new file mode 100644
index 000000000..aeaceb662
--- /dev/null
+++ b/client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html
@@ -0,0 +1,50 @@
1<div class="sub-menu" [ngClass]="{ 'no-scroll': isModalOpened }">
2 <ng-container *ngFor="let menuEntry of menuEntries; index as id">
3
4 <a *ngIf="menuEntry.routerLink" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings">{{ menuEntry.label }}</a>
5
6 <div *ngIf="!menuEntry.routerLink" ngbDropdown class="parent-entry"
7 #dropdown="ngbDropdown" (mouseleave)="closeDropdownIfHovered(dropdown)">
8 <span
9 *ngIf="isInSmallView"
10 [ngClass]="{ active: !!suffixLabels[menuEntry.label] }"
11 (click)="openModal(id)" role="button" class="title-page title-page-settings">
12 <ng-container i18n>{{ menuEntry.label }}</ng-container>
13 <ng-container *ngIf="!!suffixLabels[menuEntry.label]"> - {{ suffixLabels[menuEntry.label] }}</ng-container>
14 </span>
15
16 <span
17 *ngIf="!isInSmallView"
18 (mouseenter)="openDropdownOnHover(dropdown)" [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" ngbDropdownAnchor
19 (click)="dropdownAnchorClicked(dropdown)" role="button" class="title-page title-page-settings"
20 >
21 <ng-container i18n>{{ menuEntry.label }}</ng-container>
22 <ng-container *ngIf="!!suffixLabels[menuEntry.label]"> - {{ suffixLabels[menuEntry.label] }}</ng-container>
23 </span>
24
25 <div ngbDropdownMenu>
26 <a *ngFor="let menuChild of menuEntry.children" class="dropdown-item" [ngClass]="{ icon: hasIcons }" [routerLink]="menuChild.routerLink">
27 <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>
28
29 {{ menuChild.label }}
30 </a>
31 </div>
32 </div>
33 </ng-container>
34</div>
35
36<ng-template #modal let-close="close" let-dismiss="dismiss">
37 <div class="modal-body">
38 <ng-container *ngFor="let menuEntry of menuEntries; index as id">
39 <div [ngClass]="{ hidden: id !== currentMenuEntryIndex }">
40 <a *ngFor="let menuChild of menuEntry.children"
41 [ngClass]="{ icon: hasIcons }"
42 [routerLink]="menuChild.routerLink" routerLinkActive="active" (click)="dismissOtherModals()">
43 <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon>
44
45 {{ menuChild.label }}
46 </a>
47 </div>
48 </ng-container>
49 </div>
50</ng-template>