mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
support for logout notification
This commit is contained in:
@@ -11,4 +11,6 @@ export enum NotificationType {
|
|||||||
SyncFolderUpdate = 8,
|
SyncFolderUpdate = 8,
|
||||||
SyncCipherDelete = 9,
|
SyncCipherDelete = 9,
|
||||||
SyncSettings = 10,
|
SyncSettings = 10,
|
||||||
|
|
||||||
|
LogOut = 11,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
|||||||
|
|
||||||
constructor(private userService: UserService, private syncService: SyncService,
|
constructor(private userService: UserService, private syncService: SyncService,
|
||||||
private appIdService: AppIdService, private apiService: ApiService,
|
private appIdService: AppIdService, private apiService: ApiService,
|
||||||
private cryptoService: CryptoService) { }
|
private cryptoService: CryptoService, private logoutCallback: () => Promise<void>) { }
|
||||||
|
|
||||||
async init(environmentService: EnvironmentService): Promise<void> {
|
async init(environmentService: EnvironmentService): Promise<void> {
|
||||||
this.inited = false;
|
this.inited = false;
|
||||||
@@ -136,6 +136,9 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
|||||||
// Stop so a reconnect can be made
|
// Stop so a reconnect can be made
|
||||||
await this.signalrConnection.stop();
|
await this.signalrConnection.stop();
|
||||||
break;
|
break;
|
||||||
|
case NotificationType.LogOut:
|
||||||
|
this.logoutCallback();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user