1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-14 02:08:50 +02:00

focus master password field on load

This commit is contained in:
Kyle Spearrin 2017-07-24 12:08:21 -04:00
parent d6d535ed9e
commit 10792f714e
6 changed files with 29 additions and 5 deletions

View File

@ -2,13 +2,17 @@
.module('bit.settings')
.controller('settingsTwoStepAuthenticatorController', function ($scope, apiService, $uibModalInstance, cryptoService,
authService, $q, toastr, $analytics, constants) {
authService, $q, toastr, $analytics, constants, $timeout) {
$analytics.eventTrack('settingsTwoStepAuthenticatorController', { category: 'Modal' });
var _issuer = 'bitwarden',
_profile = null,
_masterPasswordHash,
_key = null;
$timeout(function () {
$("#masterPassword").focus();
});
$scope.auth = function (model) {
var response = null;
$scope.authPromise = cryptoService.hashPassword(model.masterPassword).then(function (hash) {

View File

@ -2,7 +2,7 @@
.module('bit.settings')
.controller('settingsTwoStepDuoController', function ($scope, apiService, $uibModalInstance, cryptoService,
toastr, $analytics, constants) {
toastr, $analytics, constants, $timeout) {
$analytics.eventTrack('settingsTwoStepDuoController', { category: 'Modal' });
var _masterPasswordHash;
@ -13,6 +13,10 @@
skey: null
};
$timeout(function () {
$("#masterPassword").focus();
});
$scope.auth = function (model) {
$scope.authPromise = cryptoService.hashPassword(model.masterPassword).then(function (hash) {
_masterPasswordHash = hash;

View File

@ -2,7 +2,7 @@
.module('bit.settings')
.controller('settingsTwoStepEmailController', function ($scope, apiService, $uibModalInstance, cryptoService,
authService, toastr, $analytics, constants) {
authService, toastr, $analytics, constants, $timeout) {
$analytics.eventTrack('settingsTwoStepEmailController', { category: 'Modal' });
var _profile = null,
_masterPasswordHash;
@ -12,6 +12,10 @@
email: null
};
$timeout(function () {
$("#masterPassword").focus();
});
$scope.auth = function (model) {
var response = null;
$scope.authPromise = cryptoService.hashPassword(model.masterPassword).then(function (hash) {

View File

@ -2,7 +2,7 @@
.module('bit.settings')
.controller('settingsTwoStepRecoverController', function ($scope, apiService, $uibModalInstance, cryptoService,
$analytics) {
$analytics, $timeout) {
$analytics.eventTrack('settingsTwoStepRecoverController', { category: 'Modal' });
$scope.code = null;
@ -17,6 +17,10 @@
});
};
$timeout(function () {
$("#masterPassword").focus();
});
$scope.print = function () {
if (!$scope.code) {
return;

View File

@ -11,6 +11,10 @@
$scope.deviceListening = false;
$scope.deviceError = false;
$timeout(function () {
$("#masterPassword").focus();
});
$scope.auth = function (model) {
$scope.authPromise = cryptoService.hashPassword(model.masterPassword).then(function (hash) {
_masterPasswordHash = hash;

View File

@ -2,11 +2,15 @@
.module('bit.settings')
.controller('settingsTwoStepYubiController', function ($scope, apiService, $uibModalInstance, cryptoService,
authService, toastr, $analytics, constants) {
authService, toastr, $analytics, constants, $timeout) {
$analytics.eventTrack('settingsTwoStepYubiController', { category: 'Modal' });
var _profile = null,
_masterPasswordHash;
$timeout(function () {
$("#masterPassword").focus();
});
$scope.auth = function (model) {
var response = null;
$scope.authPromise = cryptoService.hashPassword(model.masterPassword).then(function (hash) {