Added User Management to Admin Panel, reorganized some stuff

This commit is contained in:
itzMiney committed 2025-01-03 23:59:17 +01:00
1 parent d83992d3ce
commit 83260af2e6
22 files changed
+439 -36

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
import {Component, OnInit} from '@angular/core';
import {NavigationEnd, Router, RouterLink} from '@angular/router';
import {DeviceDetectorService} from 'ngx-device-detector';
import {filter} from 'rxjs/operators';
@Component({
selector: 'app-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['./navbar.component.css'],
imports: [
RouterLink
]
})
export class NavbarComponent implements OnInit {
activeLink: string = '';
isMobile: boolean;
constructor(private router: Router, private deviceService: DeviceDetectorService) {
this.isMobile = this.deviceService.isMobile();
}
ngOnInit(): void {
this.router.events.pipe(
filter(event => event instanceof NavigationEnd)
).subscribe(() => {
// Update activeLink based on current route
const currentRoute = this.router.url;
if (currentRoute.startsWith('/blog')) {
this.activeLink = '/blog';
} else {
this.activeLink = currentRoute;
}
});
}
}