forked from CenterForOpenScience/angular-osf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotification-settings.component.html
More file actions
42 lines (39 loc) · 1.33 KB
/
notification-settings.component.html
File metadata and controls
42 lines (39 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<h2>{{ 'moderation.notificationPreferences.title' | translate }}</h2>
<p class="mt-4">
<span>{{ 'moderation.notificationPreferences.note' | translate }}</span>
<a class="ml-1 font-bold" routerLink="/settings/notifications">
{{ 'moderation.userSettings' | translate }}
</a>
</p>
@if (!isLoading()) {
<section class="notification-configuration mt-4" [formGroup]="form">
@for (sub of subscriptions(); track sub.id) {
<label [for]="'subscription-' + sub.id">
{{ 'moderation.notificationPreferences.items.' + sub.event | translate }}
</label>
<p-select
[inputId]="'subscription-' + sub.id"
[formControlName]="sub.id"
class="dropdown"
[options]="frequencyOptions"
optionLabel="label"
optionValue="value"
(onChange)="onFrequencyChange(sub, $event.value)"
>
<ng-template #selectedItem let-selectedOption>
{{ selectedOption.label | translate }}
</ng-template>
<ng-template #item let-item>
{{ item.label | translate }}
</ng-template>
</p-select>
}
</section>
} @else {
<section class="notification-configuration">
@for (_ of [1, 2]; track $index) {
<p-skeleton width="20rem" height="2rem"></p-skeleton>
<p-skeleton class="dropdown" height="3rem"></p-skeleton>
}
</section>
}