chore: remove header component
This commit is contained in:
parent
7f80d661bd
commit
d5fd7a8396
@ -1,4 +0,0 @@
|
||||
:host{
|
||||
display: block;
|
||||
width: 100svw;
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
<nav
|
||||
class="bg-gray-900/80 backdrop-blur-md border-b border-gray-800 shadow-sm fixed w-full top-0 z-50">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-16">
|
||||
<!-- Logo -->
|
||||
<div class="flex-shrink-0 flex items-center cursor-pointer" routerLink="/">
|
||||
<span
|
||||
class="text-2xl font-extrabold tracking-tight bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-indigo-700 dark:from-blue-400 dark:to-indigo-400">
|
||||
NeoBan
|
||||
</span>
|
||||
</div>
|
||||
@if (authStore.isLoading()) {
|
||||
<p>Loading...</p>
|
||||
}
|
||||
@else if (authStore.user() === null) {
|
||||
<!-- Actions -->
|
||||
<div class="flex items-center space-x-3">
|
||||
<a routerLink="/user/login"
|
||||
class="text-sm font-semibold text-gray-400 hover:text-blue-600 transition-colors duration-200 px-3 py-2 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800">
|
||||
Login
|
||||
</a>
|
||||
<a routerLink="/user/register"
|
||||
class="inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-semibold rounded-lg text-white bg-linear-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 shadow-md hover:shadow-lg focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-all duration-200 transform hover:-translate-y-0.5">
|
||||
Register
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
@else{
|
||||
<div class="flex font-normal items-center space-x-6">
|
||||
<button (click)="chatStore.newChat()"
|
||||
class="inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-semibold rounded-lg text-white bg-linear-to-r from-blue-600 to-indigo-600 shadow-md hover:shadow-lg transition-all duration-200 transform hover:-translate-y-0.5">
|
||||
New Chat
|
||||
</button>
|
||||
<span class="text-sm text-gray-200 dark:text-gray-300">
|
||||
{{ authStore.user()?.name }}
|
||||
</span>
|
||||
<button (click)="authStore.logout()"
|
||||
class="text-sm font-semibold rounded-lg text-gray-400 transition-all duration-200 transform hover:text-red-400">
|
||||
Logout
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@ -1,22 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { Header } from './header';
|
||||
|
||||
describe('Header', () => {
|
||||
let component: Header;
|
||||
let fixture: ComponentFixture<Header>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [Header],
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(Header);
|
||||
component = fixture.componentInstance;
|
||||
await fixture.whenStable();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -1,15 +0,0 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { AuthStore } from '../../../auth/auth.store';
|
||||
import { MessageStore } from '../../../chat/chat.store';
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
imports: [RouterLink],
|
||||
templateUrl: './header.html',
|
||||
styleUrl: './header.css',
|
||||
})
|
||||
export class Header {
|
||||
protected readonly authStore = inject(AuthStore);
|
||||
protected readonly chatStore = inject(MessageStore);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user