+ class="w-full px-4 py-8 sm:bg-card sm:w-auto sm:rounded-2xl sm:p-12 sm:shadow md:flex md:h-full md:w-1/2 md:items-center md:justify-end md:rounded-none md:p-16 md:shadow-none">
+ class="relative hidden h-full w-1/2 flex-auto items-center justify-center overflow-hidden bg-gray-800 p-16 dark:border-l md:flex lg:px-28">
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -180,7 +115,8 @@
Angor Hub
- Angor Hub is a Nostr client that is customized around the Angor protocol, a decentralized crowdfunding platform.
+ Angor Hub is a Nostr client that is customized around the Angor protocol, a decentralized crowdfunding
+ platform.
diff --git a/src/app/components/auth/register/register.component.ts b/src/app/components/auth/register/register.component.ts
index 188e1cd..73b1a83 100644
--- a/src/app/components/auth/register/register.component.ts
+++ b/src/app/components/auth/register/register.component.ts
@@ -37,60 +37,48 @@ import { AngorAlertComponent, AngorAlertType } from '@angor/components/alert';
],
})
export class RegisterComponent implements OnInit {
- @ViewChild('signUpNgForm') signUpNgForm: NgForm;
+ @ViewChild('registerNgForm') registerNgForm: NgForm;
alert: { type: AngorAlertType; message: string } = {
type: 'success',
message: '',
};
- signUpForm: UntypedFormGroup;
+ registerForm: UntypedFormGroup;
showAlert: boolean = false;
- /**
- * Constructor
- */
- constructor(
- private _formBuilder: UntypedFormBuilder,
- private _router: Router
- ) {}
+ constructor(private _formBuilder: UntypedFormBuilder, private _router: Router) {}
- // -----------------------------------------------------------------------------------------------------
- // @ Lifecycle hooks
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * On init
- */
ngOnInit(): void {
- // Create the form
- this.signUpForm = this._formBuilder.group({
+ this.registerForm = this._formBuilder.group({
name: ['', Validators.required],
- email: ['', [Validators.required, Validators.email]],
+ username: ['', Validators.required],
+ about: [''],
+ avatarUrl: [''],
password: ['', Validators.required],
- company: [''],
agreements: ['', Validators.requiredTrue],
});
}
- // -----------------------------------------------------------------------------------------------------
- // @ Public methods
- // -----------------------------------------------------------------------------------------------------
-
- /**
- * Sign up
- */
- signUp(): void {
- // Do nothing if the form is invalid
- if (this.signUpForm.invalid) {
+ register(): void {
+ if (this.registerForm.invalid) {
return;
}
- // Disable the form
- this.signUpForm.disable();
+ this.registerForm.disable();
- // Hide the alert
this.showAlert = false;
+ const name = this.registerForm.get('name')?.value;
+ const username = this.registerForm.get('username')?.value;
+ const about = this.registerForm.get('about')?.value;
+ const avatarUrl = this.registerForm.get('avatarUrl')?.value;
+ const password = this.registerForm.get('password')?.value;
+
+ console.log({ name, username, about, avatarUrl, password });
+
+ this.alert = { type: 'success', message: 'Account created successfully!' };
+ this.showAlert = true;
+ this._router.navigateByUrl('/home');
}
}