mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[Send] Update jslib and Send component (#826)
* changes made affected by jslib update * Update jslib (380b28d->0951424)
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: d376927e5e...0951424de7
@@ -24,6 +24,8 @@ import { UserService } from 'jslib/abstractions/user.service';
|
|||||||
|
|
||||||
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
||||||
|
|
||||||
|
const BroadcasterSubscriptionId = 'SendComponent';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-send',
|
selector: 'app-send',
|
||||||
templateUrl: 'send.component.html',
|
templateUrl: 'send.component.html',
|
||||||
@@ -35,16 +37,32 @@ export class SendComponent extends BaseSendComponent {
|
|||||||
|
|
||||||
constructor(sendService: SendService, i18nService: I18nService,
|
constructor(sendService: SendService, i18nService: I18nService,
|
||||||
platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService,
|
platformUtilsService: PlatformUtilsService, environmentService: EnvironmentService,
|
||||||
broadcasterService: BroadcasterService, ngZone: NgZone, searchService: SearchService,
|
ngZone: NgZone, searchService: SearchService, policyService: PolicyService, userService: UserService,
|
||||||
policyService: PolicyService, userService: UserService,
|
private componentFactoryResolver: ComponentFactoryResolver, private broadcasterService: BroadcasterService) {
|
||||||
private componentFactoryResolver: ComponentFactoryResolver) {
|
super(sendService, i18nService, platformUtilsService, environmentService, ngZone, searchService,
|
||||||
super(sendService, i18nService, platformUtilsService, environmentService, broadcasterService, ngZone,
|
policyService, userService);
|
||||||
searchService, policyService, userService);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
await super.ngOnInit();
|
await super.ngOnInit();
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
|
// Broadcaster subscription - load if sync completes in the background
|
||||||
|
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||||
|
this.ngZone.run(async () => {
|
||||||
|
switch (message.command) {
|
||||||
|
case 'syncCompleted':
|
||||||
|
if (message.successfully) {
|
||||||
|
await this.load();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
addSend() {
|
addSend() {
|
||||||
|
|||||||
Reference in New Issue
Block a user