From 71ddea9211d954a7414edbcf890fff5b139b4ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Mon, 2 May 2022 16:19:59 +0100 Subject: [PATCH] Eye icon added to login password and trim added to email field --- .../app/src/main/assets/capacitor.config.json | 2 +- src/app/pages/chat/chat.page.html | 4 ++-- src/app/pages/login/login.page.html | 5 ++++- src/app/pages/login/login.page.ts | 18 ++++++++++++++++-- .../services/chat/ws-chat-methods.service.ts | 1 + src/app/shared/chat/messages/messages.page.ts | 1 + 6 files changed, 25 insertions(+), 6 deletions(-) diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index 00b6a4931..10f114d8f 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -18,6 +18,6 @@ } }, "server": { - "url": "http://192.168.0.62:8101" + "url": "http://192.168.0.50:8101" } } diff --git a/src/app/pages/chat/chat.page.html b/src/app/pages/chat/chat.page.html index 4f0fd4379..913bdbebe 100644 --- a/src/app/pages/chat/chat.page.html +++ b/src/app/pages/chat/chat.page.html @@ -41,8 +41,8 @@
-
diff --git a/src/app/pages/login/login.page.html b/src/app/pages/login/login.page.html index e808beff2..a012c390d 100644 --- a/src/app/pages/login/login.page.html +++ b/src/app/pages/login/login.page.html @@ -27,7 +27,10 @@

Palavra-passe

- + +
+ +
diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index 42c29b4a9..1cfa6f587 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -32,6 +32,8 @@ export class LoginPage implements OnInit { sessionStore = SessionStore; permissionList = new PermissionList(); + showPassword = false; + passwordIcon = "eye"; constructor( private notificatinsservice: NotificationsService, @@ -53,6 +55,18 @@ export class LoginPage implements OnInit { }) } + togglePassword() { + this.showPassword = !this.showPassword; + + if(this.passwordIcon == "eye") { + this.passwordIcon = "eye-off"; + } else { + this.passwordIcon = "eye"; + } + + } + + //Function to validade the login inputs validateUsername() { return ( @@ -89,8 +103,8 @@ export class LoginPage implements OnInit { if(this.validatePassword()) { this.userattempt = { - username: this.username, - password: this.password, + username: this.username.trim(), + password: this.password.trim(), domainName: environment.domain, BasicAuthKey: "" } diff --git a/src/app/services/chat/ws-chat-methods.service.ts b/src/app/services/chat/ws-chat-methods.service.ts index 95b11a1f9..e462da016 100644 --- a/src/app/services/chat/ws-chat-methods.service.ts +++ b/src/app/services/chat/ws-chat-methods.service.ts @@ -338,6 +338,7 @@ export class WsChatMethodsService { this.dm[roomId] = room this._dm.push(room) + console.log(this._dm) this.dmCount++ } else { diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts index 800e543d2..af2f57df8 100644 --- a/src/app/shared/chat/messages/messages.page.ts +++ b/src/app/shared/chat/messages/messages.page.ts @@ -631,6 +631,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy async takePictureMobile() { + console.log('take picture') const roomId = this.roomId const file = await Camera.getPhoto({