mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 11:25:24 +00:00
fix(login(js)): input focus on TOTP field
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication'];
|
||||
function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication) {
|
||||
LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication', 'sgFocus'];
|
||||
function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication, focus) {
|
||||
var vm = this;
|
||||
|
||||
this.$onInit = function() {
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
if (data.totpmissingkey) {
|
||||
vm.loginState = 'totpcode';
|
||||
focus('totpcode');
|
||||
}
|
||||
else if (data.totpdisabled) {
|
||||
vm.loginState = 'totpdisabled';
|
||||
|
||||
Reference in New Issue
Block a user