Refactoring, adding some login logic stuff

This commit is contained in:
2022-09-03 13:01:54 +02:00
parent 47c494653c
commit 7b17b9b28a
13 changed files with 60 additions and 13 deletions
@@ -1,10 +1,10 @@
<div id="profile-popover">
<div *ngIf="isLoggedIn">
<h2 class="heading">Hello, Paddy!</h2>
<div *ngIf="this.user">
<h2 class="heading">Hello, {{this.user!.firstName}}!</h2>
<p>You're successfully logged in.</p>
<p>Your id is: 1</p>
<p>Your id is: {{this.user!.firebonkId}}</p>
</div>
<div *ngIf="!isLoggedIn">
<div *ngIf="!this.user">
<h2 class="heading">Not logged in</h2>
<p>Please log in to continue</p>
</div>
@@ -1,4 +1,5 @@
import {Component, ElementRef, EventEmitter, HostListener, OnInit, Output} from '@angular/core';
import {Component, ElementRef, EventEmitter, HostListener, Input, OnInit, Output} from '@angular/core';
import {User} from '../../models/user';
@Component({
selector: 'app-profile',
@@ -8,6 +9,7 @@ import {Component, ElementRef, EventEmitter, HostListener, OnInit, Output} from
export class ProfileComponent implements OnInit {
initialClick = true;
@Input() user?: User;
@Output() showProfilePopoverChange = new EventEmitter<boolean>();
isLoggedIn = true;