aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu/menu.component.html
diff options
context:
space:
mode:
authorKimsible <1877318+kimsible@users.noreply.github.com>2020-12-13 14:54:12 +0100
committerGitHub <noreply@github.com>2020-12-13 14:54:12 +0100
commit51a83970061b4005343d2bfc4edb883318ef2ca6 (patch)
treec33753d0dc51bc534706b0839cf567d673294f29 /client/src/app/menu/menu.component.html
parent75594f474a3e04086b37a014d23e89780ca67458 (diff)
downloadPeerTube-51a83970061b4005343d2bfc4edb883318ef2ca6.tar.gz
PeerTube-51a83970061b4005343d2bfc4edb883318ef2ca6.tar.zst
PeerTube-51a83970061b4005343d2bfc4edb883318ef2ca6.zip
User dropdown and notifications popover improvements (#3344)
* hove user dropdown on avatar and username * rename avatar-notification to notification component * use a link on mobile for notification component * add profile user dropdown and mobile notifications link as reusable active link * replace markAllAsRead inbox glyphicon to ok in notification popover * remove keyboard shortcuts from user dropdown on mobile * use common bell icon instead of inbox-full for notifications * remove duplicated notification in user dropdown since the bell appears on the right * adjust sensitive icon in user dropdown * align vertically user buttons popover and dropdown * adjust ellipsis on user display name and username in menu * adjust notification bell for mobile in menu * display background of user dropdown avatar and username for touchscreens * add right arrow indicator on mobile Co-authored-by: kimsible <kimsible@users.noreply.github.com> Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
Diffstat (limited to 'client/src/app/menu/menu.component.html')
-rw-r--r--client/src/app/menu/menu.component.html40
1 files changed, 19 insertions, 21 deletions
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html
index bba5fdadf..5b1c24c7a 100644
--- a/client/src/app/menu/menu.component.html
+++ b/client/src/app/menu/menu.component.html
@@ -3,32 +3,28 @@
3 <div class="top-menu"> 3 <div class="top-menu">
4 <div *ngIf="isLoggedIn" class="logged-in-block"> 4 <div *ngIf="isLoggedIn" class="logged-in-block">
5 <div> 5 <div>
6 <my-avatar-notification [user]="user" (navigate)="onActiveLinkScrollToAnchor($event)"></my-avatar-notification> 6 <div class="logged-in-more" ngbDropdown #dropdown="ngbDropdown" placement="bottom-left" [container]="dropdownContainer" (openChange)="onDropdownOpenChange($event)" autoClose="outside">
7 7 <div ngbDropdownToggle>
8 <div class="logged-in-info"> 8 <img [src]="user.accountAvatarUrl" alt="Avatar" />
9 <a *ngIf="user.account" [routerLink]="[ '/accounts', user.account.nameWithHost ]" class="logged-in-display-name">{{ user.account?.displayName }}</a> 9 <div class="logged-in-info">
10 <a *ngIf="!user.account" routerLink="/my-account/settings" class="logged-in-display-name">{{ user.account?.displayName }}</a> 10 <div class="logged-in-display-name">{{ user.account?.displayName }}</div>
11 11
12 <div class="logged-in-username">@{{ user.username }}</div> 12 <div class="logged-in-username">@{{ user.username }}</div>
13 </div> 13 </div>
14 14
15 <div class="logged-in-more" ngbDropdown [placement]="loggedInMorePlacement" container="body" autoClose="outside"> 15 <div class="dropdown-toggle-indicator">
16 <my-global-icon iconName="more-vertical" ngbDropdownToggle role="button"></my-global-icon> 16 <span class="glyphicon glyphicon-chevron-down"></span>
17 </div>
18 </div>
17 19
18 <div ngbDropdownMenu> 20 <div ngbDropdownMenu>
19 <a *ngIf="user.account" ngbDropdownItem ngbDropdownToggle class="dropdown-item" [routerLink]="[ '/accounts', user.account.nameWithHost ]"> 21 <a *ngIf="user.account" ngbDropdownItem ngbDropdownToggle class="dropdown-item" [routerLink]="[ '/accounts', user.account.nameWithHost ]"
22 #profile (click)="onActiveLinkScrollToAnchor(profile)">
20 <my-global-icon iconName="go" aria-hidden="true"></my-global-icon> <ng-container i18n>Public profile</ng-container> 23 <my-global-icon iconName="go" aria-hidden="true"></my-global-icon> <ng-container i18n>Public profile</ng-container>
21 </a> 24 </a>
22 25
23 <div class="dropdown-divider"></div> 26 <div class="dropdown-divider"></div>
24 27
25 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/notifications"
26 #notifications (click)="onActiveLinkScrollToAnchor(notifications)">
27 <my-global-icon iconName="inbox-full" aria-hidden="true"></my-global-icon> <ng-container i18n>My notifications</ng-container>
28 </a>
29
30 <div class="dropdown-divider"></div>
31
32 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openLanguageChooser()"> 28 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openLanguageChooser()">
33 <my-global-icon iconName="language" aria-hidden="true"></my-global-icon> 29 <my-global-icon iconName="language" aria-hidden="true"></my-global-icon>
34 <span i18n>Interface:</span> 30 <span i18n>Interface:</span>
@@ -42,7 +38,7 @@
42 <span class="ml-auto text-muted">{{ videoLanguages.join(', ') }}</span> 38 <span class="ml-auto text-muted">{{ videoLanguages.join(', ') }}</span>
43 </a> 39 </a>
44 40
45 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" routerLink="/my-account/settings" 41 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item settings-sensitive" routerLink="/my-account/settings"
46 fragment="video-sensitive-content-policy" #settingsSensitiveContentPolicy 42 fragment="video-sensitive-content-policy" #settingsSensitiveContentPolicy
47 (click)="onActiveLinkScrollToAnchor(settingsSensitiveContentPolicy)"> 43 (click)="onActiveLinkScrollToAnchor(settingsSensitiveContentPolicy)">
48 <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy === 'display' }" iconName="sensitive" aria-hidden="true"></my-global-icon> 44 <my-global-icon class="hover-display-toggle" [ngClass]="{ 'not-displayed': user.nsfwPolicy === 'display' }" iconName="sensitive" aria-hidden="true"></my-global-icon>
@@ -60,7 +56,7 @@
60 56
61 <div class="dropdown-divider"></div> 57 <div class="dropdown-divider"></div>
62 58
63 <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openHotkeysCheatSheet()"> 59 <a *ngIf="!isInMobileView" ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openHotkeysCheatSheet()">
64 <my-global-icon iconName="command" aria-hidden="true"></my-global-icon> 60 <my-global-icon iconName="command" aria-hidden="true"></my-global-icon>
65 <ng-container i18n>Keyboard shortcuts</ng-container> 61 <ng-container i18n>Keyboard shortcuts</ng-container>
66 </a> 62 </a>
@@ -71,6 +67,8 @@
71 </a> 67 </a>
72 </div> 68 </div>
73 </div> 69 </div>
70
71 <my-notification (navigate)="onActiveLinkScrollToAnchor($event)"></my-notification>
74 </div> 72 </div>
75 73
76 <div class="logged-in-menu"> 74 <div class="logged-in-menu">