@if(options().showStatusCode){
-
{{code() || ''}}
+
{{code() || ''}}
} @if(options().labels?.ready; as readyLabel){
{{readyLabel}}
} @if(options().events?.refresh; as refreshEvent){
diff --git a/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.html b/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.html
index 0a09a061..8d85a1e5 100644
--- a/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.html
+++ b/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.html
@@ -3,21 +3,30 @@
{{ title }}
-
+
@if(template==='signIn'){
-
-
- Reset Password
+ Forgot Password
} @if(template==='register'){
- Sign in
-
+
Register
- }
- @if(template==='reset'){
+ } @if(template==='reset'){
- Sign in
-
- Send Reset Email
+
+ Reset
}
-
\ No newline at end of file
+
diff --git a/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.ts b/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.ts
index 9aa2911e..abe0fc0c 100644
--- a/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.ts
+++ b/apps/picsa-apps/dashboard/src/app/modules/profile/components/sign-in-dialog/sign-in-dialog.component.ts
@@ -1,4 +1,4 @@
-import { ChangeDetectionStrategy, Component } from '@angular/core';
+import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import {
FormControl,
FormGroup,
@@ -50,8 +50,9 @@ export class SupabaseSignInDialogComponent {
password: new FormControl('', Validators.required),
});
+ private readonly dialogRef = inject(MatDialogRef
);
+
constructor(
- private dialogRef: MatDialogRef,
private notificationService: PicsaNotificationService,
private supabaseAuthService: SupabaseAuthService
) {}
@@ -83,8 +84,8 @@ export class SupabaseSignInDialogComponent {
const { data, error } = await this.supabaseAuthService.signInUser(email, password);
console.log({ data, error });
if (error) {
- throw new Error(error.message);
this.form.enable();
+ throw new Error(error.message);
} else {
this.dialogRef.close();
}
@@ -94,20 +95,21 @@ export class SupabaseSignInDialogComponent {
const { email, password } = this.form.value;
const { error } = await this.supabaseAuthService.signUpUser(email, password);
if (error) {
- throw new Error(error.message);
this.form.enable();
+ throw new Error(error.message);
} else {
this.dialogRef.close();
}
}
public async handleReset() {
- this.form.disable();
+ this.form.disable();
const { email } = this.form.value;
const { error } = await this.supabaseAuthService.resetEmailPassword(email);
if (error) {
- throw new Error(error.message);
this.form.enable();
+ throw new Error(error.message);
} else {
+ this.notificationService.showSuccessNotification(`Reset email sent, please check your inbox`,{duration:5000});
this.dialogRef.close();
}
}