Commit 85f0cbb4 authored by Thodoris Nestoridis's avatar Thodoris Nestoridis

login changes

parent 8d8ed690
<div *ngIf="!LoggedIn()">
<router-outlet></router-outlet>
<!-- Footer -->
<footer class="footer page-footer font-small ">
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© {{ getCurrentYear() }} Copyright:
<a href="https://depend.csd.auth.gr/">Depend Research Team</a>
</div>
<!-- Copyright -->
</footer>
<!-- Footer -->
</div>
<div *ngIf="LoggedIn()">
......@@ -19,7 +30,7 @@
<footer class="footer page-footer font-small ">
<!-- Copyright -->
<div class="footer-copyright text-center py-3">© 2022 Copyright:
<div class="footer-copyright text-center py-3">© {{ getCurrentYear() }} Copyright:
<a href="https://depend.csd.auth.gr/">Depend Research Team</a>
</div>
<!-- Copyright -->
......
......@@ -11,10 +11,14 @@ import { AuthService } from './services/auth.service';
export class AppComponent {
constructor(private authService: AuthService){}
title = 'ReqmanAngular11';
LoggedIn() {
console.log(this.authService.isLoggedIn())
return this.authService.isLoggedIn();
}
getCurrentYear(): number {
return new Date().getFullYear();
}
};
\ No newline at end of file
......@@ -9,7 +9,8 @@
<button (click)="login(username.value, password.value)">login</button>
<p>{{ error?.message }}</p>
<p *ngIf="error">{{ error?.error | json }}</p> -->
<div class="container" [@fadeInOut]>
<h1 class="app-name">Requirement Formalization Tool</h1>
<!-- Default form login -->
<div class="main-wrapper" fxLayout="row" fxLayoutAlign="center center">
......@@ -37,9 +38,12 @@
<button mat-stroked-button color="primary" class="btn-block" type="submit" (click)="login(email.value, password.value)" >Log in</button>
<!-- Register -->
<p>Not a member?
<a mat-menu-item (click)="btnRegister()">Register</a>
<a mat-menu-item routerLink="/signup">Register</a>
</p>
</form>
</mat-card>
</div>
<!-- Default form login -->
</div>
\ No newline at end of file
......@@ -95,3 +95,17 @@
.main-wrapper .mat-form-field-appearance-legacy .mat-form-field-infix {
padding: 0.8375em 0;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.app-name {
padding: 2rem;
font-size: 4rem;
margin-bottom: 2rem;
color: #333;
}
\ No newline at end of file
......@@ -3,11 +3,21 @@ import { Router } from '@angular/router';
import { AuthService } from './../../services/auth.service';
import { NotifierService } from "angular-notifier";
import {FormControl, Validators} from '@angular/forms';
import { trigger, state, style, transition, animate } from '@angular/animations';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
styleUrls: ['./login.component.scss'],
animations: [
trigger('fadeInOut', [
state('void', style({
opacity: 0
})),
transition(':enter', animate('0.5s ease-in-out')),
transition(':leave', animate('0.5s ease-in-out'))
])
]
})
export class LoginComponent implements OnInit {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment