From fa48b3d3fb45c18ad2284274b767610cf1376e89 Mon Sep 17 00:00:00 2001 From: webprofusion-chrisc Date: Wed, 29 Nov 2023 15:25:23 +0800 Subject: [PATCH] Update sign in/register form --- src/app/pages/signin/signin.html | 12 ++++++------ src/app/pages/signin/signin.ts | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/app/pages/signin/signin.html b/src/app/pages/signin/signin.html index 1ab113e..30258db 100644 --- a/src/app/pages/signin/signin.html +++ b/src/app/pages/signin/signin.html @@ -30,10 +30,7 @@ Email - - Name or Nickname - - + Password @@ -55,14 +52,17 @@ Email - + + Display Name or Nickname + + Password Confirm Password - + diff --git a/src/app/pages/signin/signin.ts b/src/app/pages/signin/signin.ts index 47300d8..b5eaa46 100644 --- a/src/app/pages/signin/signin.ts +++ b/src/app/pages/signin/signin.ts @@ -13,9 +13,11 @@ import { AlertController, LoadingController, ModalController } from '@ionic/angu export class SignInPage { email: string; password: string; + username: string; + confirmpassword: string; - mode: string = 'register'; + mode: string = 'signin'; constructor( public appManager: AppManager, @@ -40,8 +42,18 @@ export class SignInPage { } async performRegister() { + + if (this.password != this.confirmpassword) { + alert("Your password and the confirmed password do not match, please try again."); + return; + } + if (this.password.length < 6) { + alert("Your password should be at least 6 characters."); + return; + } + const loading = await this.loadingController.create({ - message: 'Signing In..' + message: 'Registering ..' }); await loading.present();