diff --git a/.editorconfig b/.editorconfig
index 59d9a3a..0792692 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -4,7 +4,7 @@ root = true
[*]
charset = utf-8
indent_style = space
-indent_size = 2
+indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
diff --git a/package.json b/package.json
index 399aa20..a6fed37 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,8 @@
"name": "frontend-hideyoshi.com",
"version": "0.0.0",
"scripts": {
- "start": "node ./server.js"
+ "start": "node ./server.js",
+ "serve": "ng serve"
},
"proxy": {
"/callback": {
diff --git a/server.js b/server.js
index 32f2236..b0389f9 100644
--- a/server.js
+++ b/server.js
@@ -1,5 +1,5 @@
const express = require('express');
-var cors = require('cors');
+const cors = require('cors');
const path = require('path');
const PKG_NAME = "frontend-hideyoshi.com";
@@ -13,4 +13,4 @@ app.get('/*', (req, res) => {
res.sendFile(path.join(`${__dirname}/dist/${PKG_NAME}/index.html`));
});
-app.listen(process.env.PORT || 5000);
\ No newline at end of file
+app.listen(process.env.PORT || 5000);
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..81388fe
--- /dev/null
+++ b/src/app/header/header-popup/error-box/error-box.component.css
@@ -0,0 +1,11 @@
+.error-box {
+ background-color: #ff00001a;
+ max-width: 320px;
+ 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..428fbf7 100644
--- a/src/app/header/header-popup/login/login.component.css
+++ b/src/app/header/header-popup/login/login.component.css
@@ -78,13 +78,14 @@
background-color: #f44336;
border-radius: 15px;
}
-.input-div:hover:after {
+.input-div:hover:after,
+.input-div:has(input.form-control:focus):after {
width: 100%;
transition: .4s;
overflow: hidden;
}
-.input-div > .form-control, .input-div > .form-control:focus {
+.input-div > .form-control, .input-div > .form-control:hover{
border: none;
border-color: inherit;
-webkit-box-shadow: none;
@@ -103,22 +104,27 @@
-webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
}
+.input-div:has(input.form-control:focus) > .form-control::placeholder,
.input-div:hover > .form-control::placeholder,
-.input-div:hover > .input-div-icon {
+.input-div:hover > .input-div-icon,
+.input-div:has(input.form-control:focus) > .input-div-icon {
color: #D8291C;
transition: .3s;
}
-.input-div:hover > .form-control::placeholder {
+.input-div:hover > .form-control::placeholder,
+.input-div:has(input.form-control:focus) > .form-control::placeholder {
font-weight: 500;
transition: .3s;
}
+
+
@media (min-width:767px) {
.authentication-container {
min-width: 630px;
}
-
+
.authentication-body {
all: unset;
justify-content: space-around;
@@ -145,4 +151,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..b954c83 100644
--- a/src/app/header/header-popup/login/login.component.html
+++ b/src/app/header/header-popup/login/login.component.html
@@ -1,57 +1,67 @@
-
- {{errorMessage}}
-
-