complete visual overhaul

This commit is contained in:
itzMiney committed 2026-03-16 00:20:57 +01:00
1 parent 02bc2faca0
commit 25d06ec49a
51 files changed
+694 -664

No files matched your search

+7 -32
View File
@@ -1,30 +1,26 @@
import {AfterViewInit, Component, Inject, OnDestroy, OnInit, PLATFORM_ID} from '@angular/core';
import {Component, Inject, OnInit, PLATFORM_ID} from '@angular/core';
import {AuthService} from '../shared/services/auth.service';
import {ActivatedRoute, Router} from '@angular/router';
import {FormsModule} from '@angular/forms';
import {VantaBackgroundService} from '../shared/services/vanta-background.service';
import {DeviceDetectorService} from '../shared/services/device-detector.service';
import {isPlatformBrowser} from '@angular/common';
import { Title } from '@angular/platform-browser';
import { take } from 'rxjs/operators';
import {ParallaxComponent} from '../shared/parallax/parallax.component';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css'],
imports: [
FormsModule
]
FormsModule,
ParallaxComponent
]
})
export class LoginComponent implements OnInit, OnDestroy, AfterViewInit {
export class LoginComponent implements OnInit {
username = '';
password = '';
errorMessage = '';
private readonly isBrowser: boolean;
private readonly boundResize = this.onResize.bind(this);
private readonly elementId = 'vanta-login-bg';
private readonly allowedAdminRoutes = new Set([
'/admin',
'/shortener'
@@ -36,13 +32,10 @@ export class LoginComponent implements OnInit, OnDestroy, AfterViewInit {
private authService: AuthService,
private router: Router,
private route: ActivatedRoute,
private vantaService: VantaBackgroundService,
private deviceService: DeviceDetectorService,
private titleService: Title,
@Inject(PLATFORM_ID) private platformId: Object
) {
this.isBrowser = isPlatformBrowser(this.platformId);
}
) {}
ngOnInit() {
this.titleService.setTitle('Login | itzMiney')
@@ -57,10 +50,6 @@ export class LoginComponent implements OnInit, OnDestroy, AfterViewInit {
this.redirectUrl = '/admin';
}
});
if (this.isBrowser) {
window.addEventListener('resize', this.boundResize);
}
}
onLogin() {
@@ -77,18 +66,4 @@ export class LoginComponent implements OnInit, OnDestroy, AfterViewInit {
}
});
}
ngAfterViewInit() {
this.vantaService.initVanta(this.elementId, {});
}
ngOnDestroy() {
this.vantaService.destroyVanta(this.elementId);
if (this.isBrowser) {
window.removeEventListener('resize', this.boundResize);
}
}
onResize() {
this.vantaService.resizeVanta(this.elementId);
}
}