1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00

[PM-2538] Add static to viewref. (#5665)

Change event handle to view
This commit is contained in:
André Bispo
2023-07-03 16:53:18 +01:00
committed by GitHub
parent 4bd750c166
commit 5e29d9be45
2 changed files with 4 additions and 8 deletions

View File

@@ -25,7 +25,8 @@
/>
</div>
</div>
<environment-selector></environment-selector>
<environment-selector #environmentSelector (onOpenSelfHostedSettings)="settings()">
</environment-selector>
</div>
<div class="checkbox remember-email">
<label for="rememberEmail">

View File

@@ -33,8 +33,8 @@ const BroadcasterSubscriptionId = "LoginComponent";
export class LoginComponent extends BaseLoginComponent implements OnDestroy {
@ViewChild("environment", { read: ViewContainerRef, static: true })
environmentModal: ViewContainerRef;
@ViewChild(EnvironmentSelectorComponent)
environmentSelector!: EnvironmentSelectorComponent;
@ViewChild("environmentSelector", { read: ViewContainerRef, static: true })
environmentSelector: EnvironmentSelectorComponent;
protected componentDestroyed$: Subject<void> = new Subject();
webVaultHostname = "";
@@ -121,11 +121,6 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
});
});
this.messagingService.send("getWindowIsFocused");
this.environmentSelector.onOpenSelfHostedSettings
.pipe(takeUntil(this.componentDestroyed$))
.subscribe(() => {
this.settings();
});
}
ngOnDestroy() {