]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/menu/notification.component.html
Use + when having more than 99 notifications
[github/Chocobozzz/PeerTube.git] / client / src / app / menu / notification.component.html
index 5aa834f36073e2ed4efa579c5cb794c9defe06b6..7a62800f5de2fbb38d2b57735076b7ebcc878841 100644 (file)
@@ -1,15 +1,20 @@
+<ng-template #notificationNumber>
+  <div *ngIf="unreadNotifications > 0 && unreadNotifications < 100" class="unread-notifications">{{ unreadNotifications }}</div>
+  <div *ngIf="unreadNotifications >= 100" class="unread-notifications">99+</div>
+</ng-template>
+
 <div
   [ngbPopover]="popContent" autoClose="outside" placement="bottom" container={this} popoverClass="popover-notifications"
   i18n-title title="View your notifications" [ngClass]="{ 'notification-inbox-popover': true, 'shown': opened, 'hidden': isInMobileView }"
   #popover="ngbPopover" (shown)="onPopoverShown()" (hidden)="onPopoverHidden()"
 >
-  <div *ngIf="unreadNotifications > 0" class="unread-notifications">{{ unreadNotifications }}</div>
+  <ng-container *ngTemplateOutlet="notificationNumber"></ng-container>
 
   <my-global-icon iconName="bell"></my-global-icon>
 </div>
 
 <div *ngIf="isInMobileView" i18n-title title="View your notifications" class="notification-inbox-link">
-  <div *ngIf="unreadNotifications > 0" class="unread-notifications">{{ unreadNotifications }}</div>
+  <ng-container *ngTemplateOutlet="notificationNumber"></ng-container>
 
   <a routerLink="/my-account/notifications" routerLinkActive="active" #link (click)="onNavigate(link)">
     <my-global-icon iconName="bell"></my-global-icon>
       <div>
         <button
           *ngIf="unreadNotifications"
-          i18n-title title="Mark all as read" class="glyphicon glyphicon-ok me-2"
+          i18n-title title="Mark all as read" class="me-2"
           (click)="markAllAsRead()"
-        ></button>
+        >
+          <my-global-icon iconName="tick"></my-global-icon>
+        </button>
+
         <a
-          i18n-title title="Update your notification preferences" class="glyphicon glyphicon-cog"
+          i18n-title title="Update your notification preferences"
           routerLink="/my-account/settings" fragment="notifications"
           #settingsNotifications (click)="onNavigate(settingsNotifications)"
-        ></a>
+        >
+          <my-global-icon iconName="cog"></my-global-icon>
+        </a>
       </div>
     </div>