]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-notifications/my-account-notifications.component.html
Fix button/input/select heights
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-notifications / my-account-notifications.component.html
index d518b22ecf2b57f44b61671b432045bb4ce74552..e3b2267683f8bbe0d8a73792dcae66ed81360482 100644 (file)
@@ -1,12 +1,31 @@
+<h1 class="visually-hidden" i18n>Notifications</h1>
+
 <div class="header">
-  <a routerLink="/my-account/settings" fragment="notifications" i18n>
-    <my-global-icon iconName="cog"></my-global-icon>
-    Notification preferences
+  <a class="peertube-button-link grey-button" routerLink="/my-account/settings" fragment="notifications">
+    <my-global-icon iconName="cog" aria-hidden="true"></my-global-icon>
+    <span i18n>Notification preferences</span>
   </a>
 
-  <button (click)="markAllAsRead()" i18n>
-    <my-global-icon iconName="circle-tick"></my-global-icon>
-    Mark all as read
+  <div class="peertube-select-container peertube-select-button ms-2 me-2">
+    <select [(ngModel)]="notificationSortType" (ngModelChange)="onChangeSortColumn()" class="form-control">
+      <option value="undefined" disabled>Sort by</option>
+      <option value="createdAt" i18n>Newest first</option>
+      <option value="read" [disabled]="!hasUnreadNotifications()" i18n>Unread first</option>
+    </select>
+  </div>
+
+  <button class="ms-auto peertube-button grey-button" [disabled]="!hasUnreadNotifications()" (click)="markAllAsRead()">
+    <ng-container *ngIf="hasUnreadNotifications()">
+      <my-global-icon iconName="tick" 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>