aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html
blob: 0727f90e88d926171c7e30cfa5240fd54ea69b12 (plain) (tree)
1
2
3
4
5
6
7
                                           
                    
                                                                     
                                                                       

                            
 








                                                                                                                      
                                                   
                                                                                
 



                                                    
                                                                                 


                                
           


                                                                 
<h1 class="sr-only" i18n>Notifications</h1>
<div class="header">
  <a routerLink="/my-account/settings" fragment="notifications" i18n>
    <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
    Notification preferences
  </a>

  <div class="peertube-select-container peertube-select-button ml-2">
    <select [(ngModel)]="notificationSortType" (ngModelChange)="onNotificationSortTypeChanged()" class="form-control">
      <option value="undefined" disabled>Sort by</option>
      <option value="created" i18n>Newest first</option>
      <option value="unread-created" i18n>Unread first</option>
    </select>
  </div>

  <button class="btn ml-auto" [disabled]="!hasUnreadNotifications()" (click)="markAllAsRead()">
    <ng-container *ngIf="hasUnreadNotifications()">
      <my-global-icon iconName="inbox-full" aria-hidden="true"></my-global-icon>

      <span i18n>Mark all as read</span>
    </ng-container>

    <ng-container *ngIf="!hasUnreadNotifications()">
      <my-global-icon iconName="circle-tick" aria-hidden="true"></my-global-icon>

      <span i18n>All read</span>
    </ng-container>
  </button>
</div>

<my-user-notifications #userNotification></my-user-notifications>