Add new components, styles, and services for user management and navigation

This commit is contained in:
liosha84
2025-06-25 13:50:14 +03:00
parent 13a8ff4494
commit 5dc79438b7
42 changed files with 1439 additions and 0 deletions
@@ -0,0 +1,49 @@
// angular import
import {Component, inject, OnInit, output} from '@angular/core';
// project import
import { NavLeftComponent } from './nav-left/nav-left.component';
import { NavRightComponent } from './nav-right/nav-right.component';
import {DOCUMENT} from '@angular/common';
@Component({
selector: 'app-nav-bar',
imports: [NavLeftComponent, NavRightComponent],
templateUrl: './nav-bar.component.html',
styleUrls: ['./nav-bar.component.scss']
})
export class NavBarComponent implements OnInit{
private document = inject<Document>(DOCUMENT);
// public props
NavCollapse = output();
NavCollapsedMob = output();
navCollapsed: boolean = false;
windowWidth: number | undefined = 1000;
navCollapsedMob: boolean;
// Constructor
constructor() {
this.navCollapsedMob = false;
}
ngOnInit(): void {
this.windowWidth = this.document.defaultView?.innerWidth;
}
// public method
navCollapse() {
if (!!this.windowWidth && this.windowWidth >= 1025) {
this.navCollapsed = !this.navCollapsed;
this.NavCollapse.emit();
}
}
navCollapseMob() {
if (!!this.windowWidth && this.windowWidth < 1025) {
this.NavCollapsedMob.emit();
}
}
}