From ff65297275d43ca0bf2a03a7c1cf2d98fb1cb247 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 27 Jun 2018 23:55:50 -0400 Subject: [PATCH] consolidate 2fa component functionality --- src/app/app.module.ts | 2 + .../two-factor-authenticator.component.html | 17 +-- .../two-factor-authenticator.component.ts | 88 ++++----------- src/app/settings/two-factor-base.component.ts | 65 ++++++++++++ .../settings/two-factor-duo.component.html | 17 +-- src/app/settings/two-factor-duo.component.ts | 90 ++++------------ .../settings/two-factor-email.component.html | 17 +-- .../settings/two-factor-email.component.ts | 88 ++++----------- .../settings/two-factor-u2f.component.html | 17 +-- src/app/settings/two-factor-u2f.component.ts | 100 +++++------------- .../settings/two-factor-verify.component.html | 15 +++ .../settings/two-factor-verify.component.ts | 73 +++++++++++++ .../two-factor-yubikey.component.html | 20 +--- .../settings/two-factor-yubikey.component.ts | 81 ++++---------- 14 files changed, 279 insertions(+), 411 deletions(-) create mode 100644 src/app/settings/two-factor-base.component.ts create mode 100644 src/app/settings/two-factor-verify.component.html create mode 100644 src/app/settings/two-factor-verify.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5463d81d3be..0711989218d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -47,6 +47,7 @@ import { TwoFactorDuoComponent } from './settings/two-factor-duo.component'; import { TwoFactorEmailComponent } from './settings/two-factor-email.component'; import { TwoFactorSetupComponent } from './settings/two-factor-setup.component'; import { TwoFactorU2fComponent } from './settings/two-factor-u2f.component'; +import { TwoFactorVerifyComponent } from './settings/two-factor-verify.component'; import { TwoFactorYubiKeyComponent } from './settings/two-factor-yubikey.component'; import { ExportComponent } from './tools/export.component'; @@ -154,6 +155,7 @@ import { SearchCiphersPipe } from 'jslib/angular/pipes/search-ciphers.pipe'; TwoFactorEmailComponent, TwoFactorOptionsComponent, TwoFactorU2fComponent, + TwoFactorVerifyComponent, TwoFactorYubiKeyComponent, TwoFactorSetupComponent, UserLayoutComponent, diff --git a/src/app/settings/two-factor-authenticator.component.html b/src/app/settings/two-factor-authenticator.component.html index 69207de3623..1eaa9b986ac 100644 --- a/src/app/settings/two-factor-authenticator.component.html +++ b/src/app/settings/two-factor-authenticator.component.html @@ -10,21 +10,8 @@ -
- - -
+ +
- - - -
+ +
- - - -
+ +
- - - -
+ +
-
- - -
+ +