mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-02 13:23:29 +01:00
[Send] Update jslib and Send component (#826)
* changes made affected by jslib update * Update jslib (380b28d
->0951424
)
This commit is contained in:
parent
f239b0cd34
commit
cb4f318419
2
jslib
2
jslib
@ -1 +1 @@
|
|||||||
Subproject commit d376927e5e583d816e78a26168f870ac78b071c0
|
Subproject commit 0951424de77fbb61a38616d13d6c67f74ee19775
|
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user