From 0be2b5868bdda04146a22ec81596dbbb81922360 Mon Sep 17 00:00:00 2001 From: sowgro Date: Sat, 22 Mar 2025 00:04:40 -0400 Subject: improve login page --- .../src/app/components/login/login.component.css | 22 +++++++++++++++++----- .../src/app/components/login/login.component.html | 16 +++++++++------- 2 files changed, 26 insertions(+), 12 deletions(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.css b/ufund-ui/src/app/components/login/login.component.css index 435cc87..cae0992 100644 --- a/ufund-ui/src/app/components/login/login.component.css +++ b/ufund-ui/src/app/components/login/login.component.css @@ -1,8 +1,20 @@ -:host, .border { - display: flex; - flex-direction: column; - max-width: 300px; - gap: 5px +:host { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + background-image: url("https://www.fineshare.com/background/jellyfish-under-fluorescent-illumination.jpg"); +} + +#box { + display: flex; + flex-direction: column; + max-width: 330px; + gap: 5px; + backdrop-filter: blur(10px); + background-color: rgba(0, 0, 0, 0.1); + padding: 30px; + color: white; } .border { diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index 2cdb6d0..aff108f 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -1,7 +1,9 @@ -You must be logged in to view this page -

Login:

- - - - -{{statusText | async}} +
+ You must be logged in to view this page +

Login:

+ + + + + {{statusText | async}} +
-- cgit v1.2.3 From 381e57d62f01056d823af74d186f6de87df9fcee Mon Sep 17 00:00:00 2001 From: sowgro Date: Sat, 22 Mar 2025 16:35:10 -0400 Subject: Dark mode! --- ufund-ui/src/app/components/login/login.component.css | 3 ++- ufund-ui/src/app/components/login/login.component.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.css b/ufund-ui/src/app/components/login/login.component.css index cae0992..c752de3 100644 --- a/ufund-ui/src/app/components/login/login.component.css +++ b/ufund-ui/src/app/components/login/login.component.css @@ -10,11 +10,12 @@ display: flex; flex-direction: column; max-width: 330px; - gap: 5px; + gap: 7px; backdrop-filter: blur(10px); background-color: rgba(0, 0, 0, 0.1); padding: 30px; color: white; + border-radius: 5px; } .border { diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index aff108f..516b07b 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -1,6 +1,6 @@
You must be logged in to view this page -

Login:

+

Login

-- cgit v1.2.3 From 96f833352eff7b9428daf2add988ecd0a2b41d92 Mon Sep 17 00:00:00 2001 From: sowgro Date: Mon, 24 Mar 2025 21:21:32 -0400 Subject: Tweak style --- ufund-ui/src/app/components/login/login.component.css | 7 +++++-- ufund-ui/src/app/components/login/login.component.html | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.css b/ufund-ui/src/app/components/login/login.component.css index c752de3..4bfcbb8 100644 --- a/ufund-ui/src/app/components/login/login.component.css +++ b/ufund-ui/src/app/components/login/login.component.css @@ -9,13 +9,16 @@ #box { display: flex; flex-direction: column; - max-width: 330px; - gap: 7px; + max-width: 350px; + gap: 10px; backdrop-filter: blur(10px); background-color: rgba(0, 0, 0, 0.1); padding: 30px; color: white; border-radius: 5px; + border-style: solid; + border-width: 1px; + border-color: white; } .border { diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index 516b07b..e04ec23 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -4,6 +4,9 @@ - +
+ New? Create an account +
+ {{statusText | async}}
-- cgit v1.2.3 From ea13cf6ab3b71ff5e83fca876ec71fec1f7b00ae Mon Sep 17 00:00:00 2001 From: sowgro Date: Wed, 26 Mar 2025 15:38:46 -0400 Subject: Make frontend work with the new backend checkout system --- ufund-ui/src/app/components/login/login.component.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.ts b/ufund-ui/src/app/components/login/login.component.ts index 9d806f5..f6a2996 100644 --- a/ufund-ui/src/app/components/login/login.component.ts +++ b/ufund-ui/src/app/components/login/login.component.ts @@ -2,12 +2,13 @@ import {Component, OnInit} from '@angular/core' import {UsersService} from '../../services/users.service'; import {ActivatedRoute, Router} from '@angular/router'; import {BehaviorSubject} from 'rxjs'; +import {AuthService} from '../../services/auth.service'; @Component({ - selector: 'app-login', - standalone: false, - templateUrl: './login.component.html', - styleUrl: './login.component.css' + selector: 'app-login', + standalone: false, + templateUrl: './login.component.html', + styleUrl: './login.component.css' }) export class LoginComponent implements OnInit { @@ -17,7 +18,8 @@ export class LoginComponent implements OnInit { constructor( protected usersService: UsersService, protected router: Router, - private route: ActivatedRoute + private route: ActivatedRoute, + private authService: AuthService ) {} ngOnInit() { @@ -31,7 +33,7 @@ export class LoginComponent implements OnInit { return; } - this.usersService.login(username, password).then(() => { + this.authService.login(username, password).then(() => { this.router.navigate([next]); }).catch(ex => { this.statusText.next("Unable to login: " + friendlyHttpStatus[ex.status]) -- cgit v1.2.3 From fb4e2bc3eb66ca861eb8393ade21811e4510669a Mon Sep 17 00:00:00 2001 From: sowgro Date: Fri, 28 Mar 2025 19:09:53 -0400 Subject: Start implementation new design --- ufund-ui/src/app/components/login/login.component.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.css b/ufund-ui/src/app/components/login/login.component.css index 4bfcbb8..b56b4eb 100644 --- a/ufund-ui/src/app/components/login/login.component.css +++ b/ufund-ui/src/app/components/login/login.component.css @@ -3,7 +3,11 @@ align-items: center; justify-content: center; height: 100%; - background-image: url("https://www.fineshare.com/background/jellyfish-under-fluorescent-illumination.jpg"); + /*background-image: url("https://www.fineshare.com/background/jellyfish-under-fluorescent-illumination.jpg");*/ + background: rgba(0, 0, 0, .65) url("https://4kwallpapers.com/images/wallpapers/blue-jellyfish-aquarium-underwater-glowing-marine-life-1920x1080-3546.jpg"); + background-blend-mode: darken; + margin-top: -66px + } #box { @@ -18,7 +22,7 @@ border-radius: 5px; border-style: solid; border-width: 1px; - border-color: white; + border-color: rgb(140, 140, 255); } .border { -- cgit v1.2.3 From 3c9a9004780c0b91772fd7f868c642bdadb60348 Mon Sep 17 00:00:00 2001 From: sowgro Date: Sun, 30 Mar 2025 14:10:09 -0400 Subject: Clean up signup component --- ufund-ui/src/app/components/login/login.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index 2cdb6d0..a6441f4 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -3,5 +3,5 @@ - + {{statusText | async}} -- cgit v1.2.3 From 5f083f775917c15597b3b70a0eb6a0ce2fda7667 Mon Sep 17 00:00:00 2001 From: sowgro Date: Mon, 31 Mar 2025 11:28:42 -0400 Subject: More css tweaks --- ufund-ui/src/app/components/login/login.component.html | 1 - 1 file changed, 1 deletion(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index 743b1b3..e1c3e2a 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -1,5 +1,4 @@
- You must be logged in to view this page

Login

-- cgit v1.2.3 From 655f83af9ba59d6153c9916b9a31bfe12680655e Mon Sep 17 00:00:00 2001 From: Gunther6070 Date: Mon, 31 Mar 2025 13:12:42 -0400 Subject: Implemented localStorage cookies to maintain user persistence --- ufund-ui/src/app/components/login/login.component.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.ts b/ufund-ui/src/app/components/login/login.component.ts index f6a2996..4dcaedd 100644 --- a/ufund-ui/src/app/components/login/login.component.ts +++ b/ufund-ui/src/app/components/login/login.component.ts @@ -35,6 +35,8 @@ export class LoginComponent implements OnInit { this.authService.login(username, password).then(() => { this.router.navigate([next]); + let key = this.authService.getApiKey() + localStorage.setItem("credential", JSON.stringify({username: username, key: key})) }).catch(ex => { this.statusText.next("Unable to login: " + friendlyHttpStatus[ex.status]) console.log(ex) -- cgit v1.2.3 From e1ef22279baccb4b2a5a1ecbb5222e4008d4d523 Mon Sep 17 00:00:00 2001 From: Gunther6070 Date: Mon, 31 Mar 2025 20:28:35 -0400 Subject: Added toasts for error handling --- ufund-ui/src/app/components/login/login.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.ts b/ufund-ui/src/app/components/login/login.component.ts index 4dcaedd..0177f67 100644 --- a/ufund-ui/src/app/components/login/login.component.ts +++ b/ufund-ui/src/app/components/login/login.component.ts @@ -1,8 +1,8 @@ import {Component, OnInit} from '@angular/core' import {UsersService} from '../../services/users.service'; import {ActivatedRoute, Router} from '@angular/router'; -import {BehaviorSubject} from 'rxjs'; import {AuthService} from '../../services/auth.service'; +import {ToastsService, ToastType} from '../../services/toasts.service'; @Component({ selector: 'app-login', @@ -13,13 +13,13 @@ import {AuthService} from '../../services/auth.service'; export class LoginComponent implements OnInit { protected next?: string | null; - protected statusText = new BehaviorSubject("") constructor( protected usersService: UsersService, protected router: Router, private route: ActivatedRoute, - private authService: AuthService + private authService: AuthService, + private toastService: ToastsService ) {} ngOnInit() { @@ -38,7 +38,7 @@ export class LoginComponent implements OnInit { let key = this.authService.getApiKey() localStorage.setItem("credential", JSON.stringify({username: username, key: key})) }).catch(ex => { - this.statusText.next("Unable to login: " + friendlyHttpStatus[ex.status]) + this.toastService.sendToast(ToastType.ERROR, "Unable to login: " + friendlyHttpStatus[ex.status]) console.log(ex) }) } @@ -50,9 +50,9 @@ export class LoginComponent implements OnInit { } this.usersService.createUser(username, password).then(() => { - this.statusText.next("Account created, click login.") + this.toastService.sendToast(ToastType.INFO, "Account created, click login.") }).catch(ex => { - this.statusText.next("Unable to create account: " + friendlyHttpStatus[ex.status]) + this.toastService.sendToast(ToastType.ERROR, "Unable to create account: " + friendlyHttpStatus[ex.status]) console.log(ex) }) } -- cgit v1.2.3 From 6af14c6089f0fa0924740fb6089affc545f93a81 Mon Sep 17 00:00:00 2001 From: Gunther6070 Date: Mon, 31 Mar 2025 20:51:59 -0400 Subject: Removed broken status texts which have been replaced with toasts --- ufund-ui/src/app/components/login/login.component.html | 1 - 1 file changed, 1 deletion(-) (limited to 'ufund-ui/src/app/components/login') diff --git a/ufund-ui/src/app/components/login/login.component.html b/ufund-ui/src/app/components/login/login.component.html index e1c3e2a..c67b903 100644 --- a/ufund-ui/src/app/components/login/login.component.html +++ b/ufund-ui/src/app/components/login/login.component.html @@ -6,5 +6,4 @@ - {{statusText | async}}
-- cgit v1.2.3