feat: implement OnInit lifecycle hook in registration component and fix styling in verification component
This commit is contained in:
parent
bfdb76cabe
commit
09532de67b
@ -1,4 +1,4 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component, OnInit} from '@angular/core';
|
||||||
import {EmailFieldComponent} from "../../../atomic/input/email-field/email-field.component";
|
import {EmailFieldComponent} from "../../../atomic/input/email-field/email-field.component";
|
||||||
import {TextLinkComponent} from "../../../atomic/text-link/text-link.component";
|
import {TextLinkComponent} from "../../../atomic/text-link/text-link.component";
|
||||||
import {Router, RouterLink} from "@angular/router";
|
import {Router, RouterLink} from "@angular/router";
|
||||||
@ -17,7 +17,7 @@ import {verify_email} from "../../../model/util";
|
|||||||
templateUrl: './registration.component.html',
|
templateUrl: './registration.component.html',
|
||||||
styleUrl: './registration.component.css'
|
styleUrl: './registration.component.css'
|
||||||
})
|
})
|
||||||
export class RegistrationComponent {
|
export class RegistrationComponent implements OnInit {
|
||||||
mail: string = '';
|
mail: string = '';
|
||||||
|
|
||||||
constructor(private router: Router) {
|
constructor(private router: Router) {
|
||||||
@ -36,6 +36,11 @@ export class RegistrationComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_mail() {
|
set_mail() {
|
||||||
|
const focusedElement = document.activeElement as HTMLElement;
|
||||||
|
if (focusedElement) {
|
||||||
|
focusedElement.blur();
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.mail || !this.verify_mail()) {
|
if (!this.mail || !this.verify_mail()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
margin-top: 3rem;
|
margin-top: 3rem;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
|
line-height: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-container {
|
.button-container {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user