diff options
author | kimsible <kimsible@users.noreply.github.com> | 2020-07-29 19:07:03 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-07-31 11:31:45 +0200 |
commit | 837fe4f3fbdb7f07bdc7a0a643cd58802a16add9 (patch) | |
tree | e543e35a84cb472c666d65fedf723fb4f06ee4e2 /client/src/app/shared/shared-main | |
parent | 30814423ae98b6ac5f7407fc53cffe32aae57124 (diff) | |
download | PeerTube-837fe4f3fbdb7f07bdc7a0a643cd58802a16add9.tar.gz PeerTube-837fe4f3fbdb7f07bdc7a0a643cd58802a16add9.tar.zst PeerTube-837fe4f3fbdb7f07bdc7a0a643cd58802a16add9.zip |
Revert user-menu dropdown active class on sub-menu and autoclose only on outside click
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r-- | client/src/app/shared/shared-main/misc/top-menu-dropdown.component.html | 8 |
1 files changed, 2 insertions, 6 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 index 530b9e376..9a26614c9 100644 --- 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 | |||
@@ -4,12 +4,8 @@ | |||
4 | <a *ngIf="menuEntry.routerLink && isDisplayed(menuEntry)" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings">{{ menuEntry.label }}</a> | 4 | <a *ngIf="menuEntry.routerLink && isDisplayed(menuEntry)" [routerLink]="menuEntry.routerLink" routerLinkActive="active" class="title-page title-page-settings">{{ menuEntry.label }}</a> |
5 | 5 | ||
6 | <div *ngIf="!menuEntry.routerLink && isDisplayed(menuEntry)" ngbDropdown class="parent-entry" | 6 | <div *ngIf="!menuEntry.routerLink && isDisplayed(menuEntry)" ngbDropdown class="parent-entry" |
7 | #dropdown="ngbDropdown" autoClose="outside"> | 7 | #dropdown="ngbDropdown" autoClose="true"> |
8 | <span | 8 | <span |
9 | *ngIf="isInSmallView" | ||
10 | tabindex=0 | ||
11 | [ngClass]="{ active: !!suffixLabels[menuEntry.label] }" | ||
12 | (click)="openModal(id)" (keydown.enter)="openModal(id)" | ||
13 | role="button" class="title-page title-page-settings"> | 9 | role="button" class="title-page title-page-settings"> |
14 | <ng-container i18n>{{ menuEntry.label }}</ng-container> | 10 | <ng-container i18n>{{ menuEntry.label }}</ng-container> |
15 | </span> | 11 | </span> |
@@ -27,7 +23,7 @@ | |||
27 | <div ngbDropdownMenu> | 23 | <div ngbDropdownMenu> |
28 | <ng-container *ngFor="let menuChild of menuEntry.children"> | 24 | <ng-container *ngFor="let menuChild of menuEntry.children"> |
29 | <a *ngIf="isDisplayed(menuChild)" class="dropdown-item" | 25 | <a *ngIf="isDisplayed(menuChild)" class="dropdown-item" |
30 | [ngClass]="{ icon: hasIcons, active: suffixLabels[menuEntry.label] === menuChild.label }" | 26 | [ngClass]="{ icon: hasIcons }" |
31 | [routerLink]="menuChild.routerLink"> | 27 | [routerLink]="menuChild.routerLink"> |
32 | <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon> | 28 | <my-global-icon *ngIf="menuChild.iconName" [iconName]="menuChild.iconName" aria-hidden="true"></my-global-icon> |
33 | 29 | ||