PeerTube/client/src/app/menu/avatar-notification.compone...

43 lines
1.6 KiB
HTML
Raw Normal View History

2019-01-08 11:26:41 +01:00
<div
[ngbPopover]="popContent" autoClose="outside" placement="bottom-left" container="body" popoverClass="popover-notifications"
2019-02-20 10:16:04 +01:00
i18n-title title="View your notifications" class="notification-avatar" #popover="ngbPopover" (hidden)="onPopoverHidden()"
2019-01-08 11:26:41 +01:00
>
<div *ngIf="unreadNotifications > 0" class="unread-notifications">{{ unreadNotifications }}</div>
<img [src]="user.accountAvatarUrl" alt="Avatar" />
</div>
<ng-template #popContent>
2019-02-20 10:16:04 +01:00
<div class="content" [ngClass]="{ loaded: loaded }">
<div class="notifications-header">
<div i18n>Notifications</div>
2019-01-08 11:26:41 +01:00
<div>
<button
*ngIf="unreadNotifications"
i18n-title title="Mark all as read" class="glyphicon glyphicon-inbox mr-2"
(click)="markAllAsRead()"
></button>
<a
i18n-title title="Update your notification preferences" class="glyphicon glyphicon-cog"
routerLink="/my-account/settings" fragment="notifications"
></a>
</div>
2019-02-20 10:16:04 +01:00
</div>
<div *ngIf="!loaded" class="loader mt-4">
2019-02-20 10:16:04 +01:00
<my-loader [loading]="!loaded"></my-loader>
</div>
2019-01-08 11:26:41 +01:00
2019-02-20 10:16:04 +01:00
<my-user-notifications
2020-02-10 14:25:38 +01:00
[ignoreLoadingBar]="true" [infiniteScroll]="false" [itemsPerPage]="10"
2020-01-06 15:59:17 +01:00
[markAllAsReadSubject]="markAllAsReadSubject" (notificationsLoaded)="onNotificationLoaded()"
2019-02-20 10:16:04 +01:00
></my-user-notifications>
2019-01-08 11:26:41 +01:00
<a *ngIf="loaded" class="all-notifications" routerLink="/my-account/notifications">
<my-global-icon class="mr-1" iconName="inbox-full"></my-global-icon>
<span i18n>See all your notifications</span>
</a>
2019-02-20 10:16:04 +01:00
</div>
2019-01-08 11:26:41 +01:00
</ng-template>