diff --git a/src/app/header/header-popup/callback/callback.component.ts b/src/app/header/header-popup/callback/callback.component.ts
index a7f3d46..9a5db0f 100644
--- a/src/app/header/header-popup/callback/callback.component.ts
+++ b/src/app/header/header-popup/callback/callback.component.ts
@@ -19,10 +19,16 @@ export class CallbackComponent implements OnInit {
let auth: 'google' | 'github' = p['auth'];
- if (auth === 'google') {
- this.loginGoogle(p);
- } else if (auth === 'github') {
- this.loginGithub(p);
+ switch (auth) {
+ case "github":
+ this.authService.loginGithubUser(p)
+ break;
+ case "google":
+ this.authService.loginGoogleUser(p)
+ break;
+ default:
+ console.log(`Unimplemented auth: ${auth}`)
+ break;
}
this.router.navigate(['/home'])
@@ -30,12 +36,4 @@ export class CallbackComponent implements OnInit {
})
}
- private loginGoogle(p: any) {
- this.authService.loginGoogleUser(p)
- }
-
- private loginGithub(p: any) {
- this.authService.loginGithubUser(p)
- }
-
}
diff --git a/src/app/header/header-popup/error-box/error-box.component.css b/src/app/header/header-popup/error-box/error-box.component.css
new file mode 100644
index 0000000..b15d3ad
--- /dev/null
+++ b/src/app/header/header-popup/error-box/error-box.component.css
@@ -0,0 +1,11 @@
+.error-box {
+ background-color: #ff00001a;
+ min-width: 250px;
+ display: flex;
+ border-radius: 5px;
+ padding: 25px;
+ margin: 0 auto;
+ color: #ff0000;
+ font-size: 14px;
+ font-weight: 500;
+}
diff --git a/src/app/header/header-popup/error-box/error-box.component.html b/src/app/header/header-popup/error-box/error-box.component.html
new file mode 100644
index 0000000..dc5f057
--- /dev/null
+++ b/src/app/header/header-popup/error-box/error-box.component.html
@@ -0,0 +1,3 @@
+
+ {{errorMessage}}
+
diff --git a/src/app/header/header-popup/error-box/error-box.component.spec.ts b/src/app/header/header-popup/error-box/error-box.component.spec.ts
new file mode 100644
index 0000000..638a608
--- /dev/null
+++ b/src/app/header/header-popup/error-box/error-box.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { ErrorBoxComponent } from './error-box.component';
+
+describe('ErrorBoxComponent', () => {
+ let component: ErrorBoxComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ ErrorBoxComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(ErrorBoxComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/header/header-popup/error-box/error-box.component.ts b/src/app/header/header-popup/error-box/error-box.component.ts
new file mode 100644
index 0000000..89ec9ba
--- /dev/null
+++ b/src/app/header/header-popup/error-box/error-box.component.ts
@@ -0,0 +1,14 @@
+import {Component, Input} from '@angular/core';
+
+@Component({
+ selector: 'app-error-box',
+ templateUrl: './error-box.component.html',
+ styleUrls: ['./error-box.component.css']
+})
+export class ErrorBoxComponent {
+ @Input()
+ errorMessage: string|null = "Error, please try again later."
+
+ constructor() { }
+
+}
diff --git a/src/app/header/header-popup/login/login.component.css b/src/app/header/header-popup/login/login.component.css
index df70563..862da27 100644
--- a/src/app/header/header-popup/login/login.component.css
+++ b/src/app/header/header-popup/login/login.component.css
@@ -113,12 +113,14 @@
transition: .3s;
}
+
+
@media (min-width:767px) {
.authentication-container {
min-width: 630px;
}
-
+
.authentication-body {
all: unset;
justify-content: space-around;
@@ -145,4 +147,4 @@
height: 100%;
}
-}
\ No newline at end of file
+}
diff --git a/src/app/header/header-popup/login/login.component.html b/src/app/header/header-popup/login/login.component.html
index e358d43..2c36c3c 100644
--- a/src/app/header/header-popup/login/login.component.html
+++ b/src/app/header/header-popup/login/login.component.html
@@ -1,57 +1,66 @@
-
- {{errorMessage}}
-
-