]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/menu/notification.component.html
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / menu / notification.component.html
1 <div
2 [ngbPopover]="popContent" autoClose="outside" placement="bottom" container={this} popoverClass="popover-notifications"
3 i18n-title title="View your notifications" [ngClass]="{ 'notification-inbox-popover': true, 'shown': opened, 'hidden': isInMobileView }"
4 #popover="ngbPopover" (shown)="onPopoverShown()" (hidden)="onPopoverHidden()"
5 >
6 <div *ngIf="unreadNotifications > 0" class="unread-notifications">{{ unreadNotifications }}</div>
7
8 <my-global-icon iconName="bell"></my-global-icon>
9 </div>
10
11 <div *ngIf="isInMobileView" i18n-title title="View your notifications" class="notification-inbox-link">
12 <div *ngIf="unreadNotifications > 0" class="unread-notifications">{{ unreadNotifications }}</div>
13
14 <a routerLink="/my-account/notifications" routerLinkActive="active" #link (click)="onNavigate(link)">
15 <my-global-icon iconName="bell"></my-global-icon>
16 </a>
17 </div>
18
19 <ng-template #popContent>
20 <div class="content" [ngClass]="{ loaded: loaded }">
21 <div class="notifications-header">
22 <div i18n>Notifications</div>
23
24 <div>
25 <button
26 *ngIf="unreadNotifications"
27 i18n-title title="Mark all as read" class="me-2"
28 (click)="markAllAsRead()"
29 >
30 <my-global-icon iconName="tick"></my-global-icon>
31 </button>
32
33 <a
34 i18n-title title="Update your notification preferences"
35 routerLink="/my-account/settings" fragment="notifications"
36 #settingsNotifications (click)="onNavigate(settingsNotifications)"
37 >
38 <my-global-icon iconName="cog"></my-global-icon>
39 </a>
40 </div>
41 </div>
42
43 <div *ngIf="!loaded" class="loader mt-4">
44 <my-loader size="xl" [loading]="!loaded"></my-loader>
45 </div>
46
47 <my-user-notifications
48 [ignoreLoadingBar]="true" [infiniteScroll]="false" [itemsPerPage]="10"
49 [markAllAsReadSubject]="markAllAsReadSubject" (notificationsLoaded)="onNotificationLoaded()"
50 ></my-user-notifications>
51
52 <a *ngIf="loaded" class="all-notifications" routerLink="/my-account/notifications" #notifications (click)="onNavigate(notifications)">
53 <my-global-icon class="me-1" iconName="bell" aria-hidden="true"></my-global-icon>
54 <span i18n>See all your notifications</span>
55 </a>
56 </div>
57 </ng-template>