From da67b5527e22562ef2e55463624aa19a52f1288a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedek=20L=C3=A1szl=C3=B3?= Date: Sat, 11 May 2024 16:16:48 +0200 Subject: [PATCH] more material design --- src/app/auth/auth.module.ts | 9 ++- src/app/auth/login/login.component.html | 42 +++++------- src/app/auth/login/login.component.scss | 10 +++ src/app/auth/login/login.component.ts | 4 +- src/app/auth/register/register.component.html | 64 +++++++------------ src/app/auth/register/register.component.scss | 10 +++ src/app/feed/feed.component.html | 2 +- src/app/new-post/new-post.component.html | 2 +- src/app/search/search.component.html | 2 +- .../shared/top-menu/top-menu.component.html | 4 +- .../shared/top-menu/top-menu.component.scss | 8 +-- src/app/shared/top-menu/top-menu.component.ts | 3 +- src/app/user/user.component.html | 2 +- 13 files changed, 79 insertions(+), 83 deletions(-) diff --git a/src/app/auth/auth.module.ts b/src/app/auth/auth.module.ts index 2d70754..268618b 100644 --- a/src/app/auth/auth.module.ts +++ b/src/app/auth/auth.module.ts @@ -6,7 +6,9 @@ import { AuthComponent } from './auth.component'; import { ReactiveFormsModule } from '@angular/forms'; import { LoginComponent } from './login/login.component'; import { RegisterComponent } from './register/register.component'; - +import { MatButtonModule } from '@angular/material/button'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import {MatInputModule} from '@angular/material/input'; @NgModule({ declarations: [ @@ -17,7 +19,10 @@ import { RegisterComponent } from './register/register.component'; imports: [ CommonModule, AuthRoutingModule, - ReactiveFormsModule + ReactiveFormsModule, + MatButtonModule, + MatFormFieldModule, + MatInputModule ] }) export class AuthModule { } diff --git a/src/app/auth/login/login.component.html b/src/app/auth/login/login.component.html index 76471f7..8761809 100644 --- a/src/app/auth/login/login.component.html +++ b/src/app/auth/login/login.component.html @@ -1,28 +1,18 @@
-
- - - - - - - - - - - - -
- - - -
- - - -
- - -
+ + + + Email + + +
+ + Password + + + + + +
-
+ \ No newline at end of file diff --git a/src/app/auth/login/login.component.scss b/src/app/auth/login/login.component.scss index e69de29..a64933b 100644 --- a/src/app/auth/login/login.component.scss +++ b/src/app/auth/login/login.component.scss @@ -0,0 +1,10 @@ +mat-form-field { + width: 100%; +} + +.logo { + width: 100%; + text-align: center; + font-size: 32px; + margin: 10px 0 20px 0; +} \ No newline at end of file diff --git a/src/app/auth/login/login.component.ts b/src/app/auth/login/login.component.ts index c12e40b..e3597bd 100644 --- a/src/app/auth/login/login.component.ts +++ b/src/app/auth/login/login.component.ts @@ -30,8 +30,8 @@ export class LoginComponent implements OnInit { this.loginForm.get('password')?.value as String ) .then(() => { this.router.navigateByUrl("/feed") }) - .catch(() => { alert("wrong username or password") }); + .catch(() => { alert("wrong email or password") }); else - alert("missing username or password"); + alert("missing email or password"); } } diff --git a/src/app/auth/register/register.component.html b/src/app/auth/register/register.component.html index d9d4431..943f8a8 100644 --- a/src/app/auth/register/register.component.html +++ b/src/app/auth/register/register.component.html @@ -1,45 +1,29 @@
- - - - - - - - - - - - - - - - - - - - -
- - - -
- - - -
- - - -
- - - -
- - -
+ + + Email + + +
+ + Username [3+] + + +
+ + Password + + +
+ + Repeat Password + + + + + +
diff --git a/src/app/auth/register/register.component.scss b/src/app/auth/register/register.component.scss index e69de29..a64933b 100644 --- a/src/app/auth/register/register.component.scss +++ b/src/app/auth/register/register.component.scss @@ -0,0 +1,10 @@ +mat-form-field { + width: 100%; +} + +.logo { + width: 100%; + text-align: center; + font-size: 32px; + margin: 10px 0 20px 0; +} \ No newline at end of file diff --git a/src/app/feed/feed.component.html b/src/app/feed/feed.component.html index ec1f9bf..aa94655 100644 --- a/src/app/feed/feed.component.html +++ b/src/app/feed/feed.component.html @@ -1,4 +1,4 @@ - +
diff --git a/src/app/new-post/new-post.component.html b/src/app/new-post/new-post.component.html index b800dd4..f404638 100644 --- a/src/app/new-post/new-post.component.html +++ b/src/app/new-post/new-post.component.html @@ -1,4 +1,4 @@ - +
diff --git a/src/app/search/search.component.html b/src/app/search/search.component.html index f684bd8..6cea53e 100644 --- a/src/app/search/search.component.html +++ b/src/app/search/search.component.html @@ -1,4 +1,4 @@ - +
diff --git a/src/app/shared/top-menu/top-menu.component.html b/src/app/shared/top-menu/top-menu.component.html index ca21118..6afc5f2 100644 --- a/src/app/shared/top-menu/top-menu.component.html +++ b/src/app/shared/top-menu/top-menu.component.html @@ -3,11 +3,11 @@ menu - Quack + {{title != undefined ? title : 'Quack'}} - Search + Search users