add progress bar

This commit is contained in:
tiago.kayaya
2021-01-27 16:01:49 +01:00
parent 585f5a1fb0
commit 942eeb2bde
44 changed files with 448 additions and 510 deletions
+5 -5
View File
@@ -52,15 +52,15 @@ export class LoginPage implements OnInit {
await alert.present();
}
loginRocketChat(){
loginRocketChat(user:any){
let postData = {
"user": this.username,
"password": this.password
"user": user.username,
"password": user.password,
}
this.authService.loginChat(postData).subscribe((res: any) =>{
console.log(res.data);
this.storageService.store(AuthConnstants.AUTH, res.data);
console.log('Logged user \n'+res.data);
console.log('Login to Rocket chat OK');
},(error:any) =>{
console.log('Network error');
@@ -84,7 +84,7 @@ export class LoginPage implements OnInit {
if (await this.authService.login(this.userattempt)){
console.log(this.userattempt);
this.loginRocketChat();
this.loginRocketChat(this.userattempt);
this.router.navigate(['/home/events']);
}
else