1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 13:23:34 +00:00

feat(notifications): Ensure UnsupportedSystemNotificationService is registered in browsers that don't support notifications in Angular contexts (#16296)

This commit is contained in:
Justin Baur
2025-09-05 10:34:29 -04:00
committed by GitHub
parent 203a24723b
commit bb6fabd292
4 changed files with 33 additions and 14 deletions

View File

@@ -35,6 +35,12 @@ export type SystemNotificationEvent = {
* A service responsible for displaying operating system level server notifications.
*/
export abstract class SystemNotificationsService {
/**
* Used to know if a given platform supports system notifications. This check should
* be used to guard any usage of the other members in this service.
*/
abstract isSupported(): boolean;
abstract notificationClicked$: Observable<SystemNotificationEvent>;
/**
@@ -50,9 +56,4 @@ export abstract class SystemNotificationsService {
* @param clearInfo Any info needed required to clear a notification.
*/
abstract clear(clearInfo: SystemNotificationClearInfo): Promise<void>;
/**
* Used to know if a given platform supports server notifications.
*/
abstract isSupported(): boolean;
}