pwa notifications

This commit is contained in:
Bastian Wagner
2026-06-29 14:52:33 +02:00
parent 8fdee223c0
commit a033c50c25
18 changed files with 780 additions and 26 deletions

View File

@@ -54,6 +54,50 @@
<span>Speichert...</span>
</div>
}
<div class="push-row">
<div>
<h3>PWA-Benachrichtigungen</h3>
<p>
Gleiche Tasks und Zeiten wie die Task-Mail. Die App braucht dafuer eine
Browser-Erlaubnis.
</p>
</div>
@if (!taskPush.supported()) {
<span class="push-state">Nicht unterstuetzt</span>
} @else if (taskPush.permission() === 'granted') {
<button
mat-stroked-button
type="button"
[disabled]="taskPush.saving()"
(click)="disablePushNotifications()"
>
@if (taskPush.saving()) {
<mat-progress-spinner mode="indeterminate" diameter="18" />
} @else {
<mat-icon aria-hidden="true">notifications_off</mat-icon>
}
Deaktivieren
</button>
} @else {
<button
mat-stroked-button
type="button"
[disabled]="
taskPush.saving() || (auth.user()?.taskDigestPreference ?? 'both') === 'none'
"
(click)="enablePushNotifications()"
>
@if (taskPush.saving()) {
<mat-progress-spinner mode="indeterminate" diameter="18" />
} @else {
<mat-icon aria-hidden="true">notifications_active</mat-icon>
}
Aktivieren
</button>
}
</div>
</section>
</mat-card-content>