From 7373e281ace87d67c14ffb27db21521d92a0aef3 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 11 Feb 2017 14:21:21 -0500 Subject: [PATCH] print recovery code. changed vault and login route --- src/app/config.js | 6 ++--- .../settings/settingsTwoFactorController.js | 8 +++++++ src/app/settings/views/settingsTwoFactor.html | 23 +++++++++---------- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/app/config.js b/src/app/config.js index 84914f87f0..85b7b2661b 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -76,7 +76,7 @@ angular } }) .state('backend.vault', { - url: '^/', + url: '^/vault', templateUrl: 'app/vault/views/vault.html', controller: 'vaultController', data: { pageTitle: 'My Vault' } @@ -110,14 +110,14 @@ angular } }) .state('frontend.login.info', { - url: '^/login', + url: '^/', templateUrl: 'app/accounts/views/accountsLoginInfo.html', data: { pageTitle: 'Log In' } }) .state('frontend.login.twoFactor', { - url: '^/login/two-factor', + url: '^/two-factor', templateUrl: 'app/accounts/views/accountsLoginTwoFactor.html', data: { pageTitle: 'Log In (Two Factor)', diff --git a/src/app/settings/settingsTwoFactorController.js b/src/app/settings/settingsTwoFactorController.js index 5044ad483d..dfd125d20d 100644 --- a/src/app/settings/settingsTwoFactorController.js +++ b/src/app/settings/settingsTwoFactorController.js @@ -74,6 +74,14 @@ }).$promise; }; + $scope.print = function (printContent) { + var w = window.open(); + w.document.write('

bitwarden two-step login recovery code:

' + + '
' + printContent + '
'); + w.print(); + w.close(); + } + $scope.close = function () { $uibModalInstance.dismiss('cancel'); }; diff --git a/src/app/settings/views/settingsTwoFactor.html b/src/app/settings/views/settingsTwoFactor.html index 794c45a782..4ba8d18276 100644 --- a/src/app/settings/views/settingsTwoFactor.html +++ b/src/app/settings/views/settingsTwoFactor.html @@ -58,17 +58,16 @@

-

Recovery Code

-

- The recovery code allows you to access your account in the event that you lose your authenticator app. - bitwarden support won't be able to assist you if you lose access to your account. We recommend you write down or - print the recovery code below and keep it in a safe place. -

- +
+

Recovery Code

+

+ The recovery code allows you to access your account in the event that you lose your authenticator app. + bitwarden support won't be able to assist you if you lose access to your account. We recommend you write down or + print the recovery code below and keep it in a safe place. +

+

Recovery Code: {{twoFactorModel.recovery}}

+ +

Errors have occured

@@ -77,7 +76,7 @@

-

3. Enter the resulting verification code from the app

+

What to disable? 3. Enter the resulting verification code from the app