Skip to content

Commit

Permalink
Merge branch 'main' into real-time-updates
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/server/host/appsettings.Development.json
  • Loading branch information
MaSch0212 committed Jun 22, 2024
2 parents 7be3fcc + 40cb77f commit efadfda
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FormsModule } from '@angular/forms';
import { SwPush } from '@angular/service-worker';
import { Actions, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { MessageService } from 'primeng/api';
import { ButtonModule } from 'primeng/button';
import { CardModule } from 'primeng/card';
import { DropdownModule } from 'primeng/dropdown';
Expand Down Expand Up @@ -76,6 +77,7 @@ export class UserSettingsComponent {
private readonly _wellKnownService = inject(WellKnownService);
private readonly _actions$ = inject(Actions);
private readonly _swPush = inject(SwPush);
private readonly _messageService = inject(MessageService);

private readonly _loadActionState = selectSignal(selectUserSettingsActionState('load'));
private readonly _updateActionState = selectSignal(selectUserSettingsActionState('update'));
Expand Down Expand Up @@ -189,6 +191,12 @@ export class UserSettingsComponent {
} else {
this.resetNgModel.next();
this.isUpdatingPushSubscription.set(false);
this._messageService.add({
severity: 'error',
summary: this.translations.settings_notifications_errors_notGranted_title(),
detail: this.translations.settings_notifications_errors_notGranted_description(),
sticky: true,
});
}
});
} else {
Expand Down
8 changes: 7 additions & 1 deletion src/client/src/app/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"title": "Benachrichtigungen",
"enabledOnAllDevices": "Auf allen Geräten aktiviert",
"eanbled": "Auf diesem Gerät aktiviert",
"errors": {
"notGranted": {
"title": "Erlaubnis über Benachrichtigungen nicht erteilt",
"description": "Um Benachrichtigungen erhalten zu können, musst du dies in den Systemeinstellungen aktivieren, oder die App erneut installieren."
}
},
"notify": {
"title": "Benachrichtigen, wenn...",
"eventPublish": "eine Veranstaltung veröffentlicht wird",
Expand Down Expand Up @@ -121,7 +127,7 @@
},
"commitDialog": {
"title": "Veranstaltung freigeben",
"text": "Möchtest du die Veranstlaung {{date}} wirklich freigeben? Die Zeitfenster können nicht mehr angepasst werden und die Spieler werden über ein neues Event benachrichtig"
"text": "Möchtest du die Veranstlaung {{date}} wirklich freigeben? Die Zeitfenster können nicht mehr angepasst werden und die Spieler werden über ein neues Event benachrichtigt"
},
"error": {
"load": "Fehler beim Laden der Veranstaltungen.",
Expand Down
6 changes: 6 additions & 0 deletions src/client/src/app/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"title": "Notifications",
"enabledOnAllDevices": "Enabled on all devices",
"eanbled": "Enabled on this device",
"errors": {
"notGranted": {
"title": "Notification permission not granted",
"description": "To receive notifications, you must activate this in the system settings or reinstall the app."
}
},
"notify": {
"title": "Notify me when...",
"eventPublish": "an event is published",
Expand Down
2 changes: 1 addition & 1 deletion src/server/host/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Url": "http://0.0.0.0:5000"
},
"Https": {
"Url": "https://0.0.0.0:5004"
"Url": "https://0.0.0.0:5001"
}
}
},
Expand Down

0 comments on commit efadfda

Please sign in to comment.