diff --git a/src/app/accounts/login.component.html b/src/app/accounts/login.component.html index ae85b1d3c83..86bcc02af09 100644 --- a/src/app/accounts/login.component.html +++ b/src/app/accounts/login.component.html @@ -1,4 +1,4 @@ -
+
Bitwarden

{{'loginOrCreateNewAccount' | i18n}}

@@ -36,8 +36,9 @@ - -  {{'settings' | i18n}} + +
diff --git a/src/app/accounts/login.component.ts b/src/app/accounts/login.component.ts index 4ccdff9aee0..21cc7dc1637 100644 --- a/src/app/accounts/login.component.ts +++ b/src/app/accounts/login.component.ts @@ -24,6 +24,8 @@ import { ModalComponent } from 'jslib/angular/components/modal.component'; export class LoginComponent extends BaseLoginComponent { @ViewChild('environment', { read: ViewContainerRef }) environmentModal: ViewContainerRef; + showingModal = false; + constructor(authService: AuthService, router: Router, i18nService: I18nService, syncService: SyncService, private componentFactoryResolver: ComponentFactoryResolver, storageService: StorageService, @@ -37,9 +39,17 @@ export class LoginComponent extends BaseLoginComponent { settings() { const factory = this.componentFactoryResolver.resolveComponentFactory(ModalComponent); const modal = this.environmentModal.createComponent(factory).instance; + modal.onShown.subscribe(() => { + this.showingModal = true; + }); + modal.onClosed.subscribe(() => { + this.showingModal = false; + modal.onShown.unsubscribe(); + modal.onClosed.unsubscribe(); + }); + const childComponent = modal.show(EnvironmentComponent, this.environmentModal); - childComponent.onSaved.subscribe(() => { modal.close(); }); diff --git a/src/app/accounts/two-factor.component.html b/src/app/accounts/two-factor.component.html index 2b045191599..7b0866e4007 100644 --- a/src/app/accounts/two-factor.component.html +++ b/src/app/accounts/two-factor.component.html @@ -1,4 +1,4 @@ -
+

{{title}}

{{'enterVerificationCodeApp' | i18n}}

diff --git a/src/app/accounts/two-factor.component.ts b/src/app/accounts/two-factor.component.ts index 06aed824049..5a0a5d08665 100644 --- a/src/app/accounts/two-factor.component.ts +++ b/src/app/accounts/two-factor.component.ts @@ -28,6 +28,8 @@ import { TwoFactorComponent as BaseTwoFactorComponent } from 'jslib/angular/comp export class TwoFactorComponent extends BaseTwoFactorComponent { @ViewChild('twoFactorOptions', { read: ViewContainerRef }) twoFactorOptionsModal: ViewContainerRef; + showingModal = false; + constructor(authService: AuthService, router: Router, i18nService: I18nService, apiService: ApiService, platformUtilsService: PlatformUtilsService, syncService: SyncService, @@ -41,9 +43,17 @@ export class TwoFactorComponent extends BaseTwoFactorComponent { anotherMethod() { const factory = this.componentFactoryResolver.resolveComponentFactory(ModalComponent); const modal = this.twoFactorOptionsModal.createComponent(factory).instance; + modal.onShown.subscribe(() => { + this.showingModal = true; + }); + modal.onClosed.subscribe(() => { + this.showingModal = false; + modal.onShown.unsubscribe(); + modal.onClosed.unsubscribe(); + }); + const childComponent = modal.show(TwoFactorOptionsComponent, this.twoFactorOptionsModal); - childComponent.onProviderSelected.subscribe(async (provider: TwoFactorProviderType) => { modal.close(); this.selectedProviderType = provider;