]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.html
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +my-account / my-account-settings / my-account-notification-preferences / my-account-notification-preferences.component.html
index 75951006d8bfd2dbe3f27c78ef21f492a8f3b22d..46f5e5d6b1273f97001930aba2247471ebbd65e1 100644 (file)
@@ -1,25 +1,29 @@
-<div class="custom-row">
-  <div i18n>Activities</div>
-  <div i18n>Web</div>
-  <div i18n *ngIf="emailEnabled">Email</div>
-</div>
+<div *ngIf="webNotifications">
+  <ng-container *ngFor="let group of notificationSettingGroups">
+    <div class="header notification-row">
+      <div i18n>{{ group.label }}</div>
+      <div i18n>Web</div>
+      <div i18n *ngIf="emailEnabled">Email</div>
+    </div>
 
-<ng-container *ngFor="let notificationType of notificationSettingKeys">
-  <div class="custom-row" *ngIf="hasUserRight(notificationType)">
-    <div>{{ labelNotifications[notificationType] }}</div>
+    <ng-container *ngFor="let notificationType of group.keys">
+      <div class="small notification-row" *ngIf="hasUserRight(notificationType)">
+        <div>{{ labelNotifications[notificationType] }}</div>
 
-    <div>
-      <my-input-switch
-        [(ngModel)]="webNotifications[notificationType]"
-        (ngModelChange)="updateWebSetting(notificationType, webNotifications[notificationType])"
-      ></my-input-switch>
-    </div>
+        <div>
+          <my-input-switch
+            [(ngModel)]="webNotifications[notificationType]"
+            (ngModelChange)="updateWebSetting(notificationType, webNotifications[notificationType])"
+          ></my-input-switch>
+        </div>
 
-    <div *ngIf="emailEnabled">
-      <my-input-switch
-        [(ngModel)]="emailNotifications[notificationType]"
-        (ngModelChange)="updateEmailSetting(notificationType, emailNotifications[notificationType])"
-      ></my-input-switch>
-    </div>
-  </div>
-</ng-container>
+        <div *ngIf="emailEnabled">
+          <my-input-switch
+            [(ngModel)]="emailNotifications[notificationType]"
+            (ngModelChange)="updateEmailSetting(notificationType, emailNotifications[notificationType])"
+          ></my-input-switch>
+        </div>
+      </div>
+    </ng-container>
+  </ng-container>
+</div>