Refs #364 ajustar estilos css dashboard

pull/2/head
Alvaro Puente Mella 2024-05-24 10:19:14 +02:00
parent 39d5b98aae
commit 27e55816bd
14 changed files with 43 additions and 51 deletions

View File

@ -1,11 +1,9 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AuthLayoutComponent } from './components/layout/auth-layout/auth-layout.component';
import { MainLayoutComponent } from './components/layout/main-layout/main-layout.component';
import { FooterComponent } from './components/layout/footer/footer.component';
import { HeaderComponent } from './components/layout/header/header.component';
import { SidebarComponent } from './components/layout/sidebar/sidebar.component';
import { LoginComponent } from './components/login/login.component';
@ -18,7 +16,6 @@ import { CustomInterceptor } from './services/custom.interceptor';
AppComponent,
AuthLayoutComponent,
MainLayoutComponent,
FooterComponent,
HeaderComponent,
SidebarComponent,
LoginComponent,

View File

@ -1,5 +0,0 @@
:host{
display: block;
background-color: blueviolet;
grid-area: footer;
}

View File

@ -1 +0,0 @@
<p>footer works!</p>

View File

@ -1,23 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component';
describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [FooterComponent]
})
.compileComponents();
fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,10 +0,0 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrl: './footer.component.css'
})
export class FooterComponent {
}

View File

@ -1,5 +1,5 @@
:host{
display: block;
background-color: red;
background-color: rgb(126, 126, 126);
grid-area: header;
}

View File

@ -1,9 +1,8 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrl: './header.component.css'
styleUrl: './header.component.css',
})
export class HeaderComponent {

View File

@ -6,7 +6,6 @@
"sidebar content"
"sidebar footer";
grid-template-columns: 120px 1fr;
height: 100%;
}
.content-wrapper{
display: block;

View File

@ -1,6 +1,6 @@
<app-sidebar></app-sidebar>
<app-header></app-header>
<app-footer></app-footer>
<app-header>
</app-header>
<div class="content-wrapper">
<div class="content">
<router-outlet />

View File

@ -1,5 +1,5 @@
:host{
display: block;
background-color: rgb(0, 128, 255);
background-color: rgb(85, 85, 85);
grid-area: sidebar;
}

View File

@ -6,5 +6,6 @@ import { Component } from '@angular/core';
styleUrl: './sidebar.component.css'
})
export class SidebarComponent {
hovered = false;
}
//https://medium.com/@yevhen.chmykhun.01/angular-blueprint-application-layout-b1680ca888e0

View File

@ -1,6 +1,5 @@
import { HttpClient } from '@angular/common/http';
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
@Component({

View File

@ -0,0 +1,17 @@
import { TestBed } from '@angular/core/testing';
import { HttpInterceptorFn } from '@angular/common/http';
import { customInterceptor } from './custom.interceptor';
describe('customInterceptor', () => {
const interceptor: HttpInterceptorFn = (req, next) =>
TestBed.runInInjectionContext(() => customInterceptor(req, next));
beforeEach(() => {
TestBed.configureTestingModule({});
});
it('should be created', () => {
expect(interceptor).toBeTruthy();
});
});

View File

@ -0,0 +1,19 @@
import { Injectable } from '@angular/core';
import { HttpInterceptorFn, HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Token } from '@angular/compiler';
export class CustomInterceptor implements HttpInterceptor{
constructor(){}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const token = localStorage.getItem('loginToken');
const newCloneRequest = req.clone({
setHeaders:{
Authorization: `${token}`
}
})
return next.handle(newCloneRequest);
}
}