1
0
mirror of https://github.com/bitwarden/web synced 2025-12-26 05:03:35 +00:00

Add show/hide button to password prompt (#1034)

This commit is contained in:
Oscar Hinton
2021-08-27 14:50:58 +02:00
committed by GitHub
parent 7c8e95d408
commit fa4e5250b9
41 changed files with 697 additions and 1234 deletions

View File

@@ -1,7 +1,4 @@
import {
Component,
ComponentFactoryResolver,
} from '@angular/core';
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ApiService } from 'jslib-common/abstractions/api.service';
@@ -9,6 +6,8 @@ import { MessagingService } from 'jslib-common/abstractions/messaging.service';
import { PolicyService } from 'jslib-common/abstractions/policy.service';
import { UserService } from 'jslib-common/abstractions/user.service';
import { ModalService } from 'jslib-angular/services/modal.service';
import { TwoFactorProviderType } from 'jslib-common/enums/twoFactorProviderType';
import { TwoFactorDuoComponent } from '../../settings/two-factor-duo.component';
@@ -20,9 +19,9 @@ import { TwoFactorSetupComponent as BaseTwoFactorSetupComponent } from '../../se
})
export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent {
constructor(apiService: ApiService, userService: UserService,
componentFactoryResolver: ComponentFactoryResolver, messagingService: MessagingService,
modalService: ModalService, messagingService: MessagingService,
policyService: PolicyService, private route: ActivatedRoute) {
super(apiService, userService, componentFactoryResolver, messagingService, policyService);
super(apiService, userService, modalService, messagingService, policyService);
}
async ngOnInit() {
@@ -32,10 +31,10 @@ export class TwoFactorSetupComponent extends BaseTwoFactorSetupComponent {
});
}
manage(type: TwoFactorProviderType) {
async manage(type: TwoFactorProviderType) {
switch (type) {
case TwoFactorProviderType.OrganizationDuo:
const duoComp = this.openModal(this.duoModalRef, TwoFactorDuoComponent);
const duoComp = await this.openModal(this.duoModalRef, TwoFactorDuoComponent);
duoComp.type = TwoFactorProviderType.OrganizationDuo;
duoComp.organizationId = this.organizationId;
duoComp.onUpdated.subscribe((enabled: boolean) => {