Admin Login can performed also by pressing the Enter key (ref #223)

This commit is contained in:
George Kalampokis 2020-01-16 12:32:25 +02:00
parent ea5ec98955
commit 6bb9ef444d
1 changed files with 5 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, HostListener } from '@angular/core';
import { Router } from '@angular/router';
import { Credential } from '@app/core/model/auth/credential';
import { AuthService } from '@app/core/services/auth/auth.service';
@ -17,6 +17,10 @@ export class AdminLoginComponent extends BaseComponent implements OnInit {
public auth2: any;
public credential: Credential;
@HostListener('document:keydown.enter', ['$event']) onKeydownHandler() {
this.nativeLogin();
}
constructor(
private authService: AuthService,
private uiNotificationService: UiNotificationService,