clean up and lint files
This commit is contained in:
@@ -6,13 +6,11 @@ describe('AddSongComponent', () => {
|
||||
let component: AddSongComponent;
|
||||
let fixture: ComponentFixture<AddSongComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [AddSongComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [AddSongComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AddSongComponent);
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('BrandComponent', () => {
|
||||
let component: BrandComponent;
|
||||
let fixture: ComponentFixture<BrandComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [BrandComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [BrandComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BrandComponent);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-brand',
|
||||
templateUrl: './brand.component.html',
|
||||
styleUrls: ['./brand.component.less'],
|
||||
selector: 'app-brand',
|
||||
templateUrl: './brand.component.html',
|
||||
styleUrls: ['./brand.component.less'],
|
||||
})
|
||||
export class BrandComponent {
|
||||
}
|
||||
export class BrandComponent {}
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('FilterComponent', () => {
|
||||
let component: FilterComponent;
|
||||
let fixture: ComponentFixture<FilterComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [FilterComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [FilterComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FilterComponent);
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {ActivatedRoute, Params, Router} from '@angular/router';
|
||||
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'app-filter',
|
||||
templateUrl: './filter.component.html',
|
||||
styleUrls: ['./filter.component.less'],
|
||||
imports: [ReactiveFormsModule, FormsModule],
|
||||
selector: 'app-filter',
|
||||
templateUrl: './filter.component.html',
|
||||
styleUrls: ['./filter.component.less'],
|
||||
imports: [ReactiveFormsModule, FormsModule],
|
||||
})
|
||||
export class FilterComponent {
|
||||
public value = '';
|
||||
|
||||
public constructor(private router: Router, activatedRoute: ActivatedRoute) {
|
||||
public constructor(
|
||||
private router: Router,
|
||||
activatedRoute: ActivatedRoute
|
||||
) {
|
||||
activatedRoute.queryParams.subscribe((params: Params) => {
|
||||
const typedParams = params as {q: string};
|
||||
if (typedParams.q) this.value = typedParams.q;
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('LinkComponent', () => {
|
||||
let component: LinkComponent;
|
||||
let fixture: ComponentFixture<LinkComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [LinkComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [LinkComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LinkComponent);
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core';
|
||||
import {faCross} from '@fortawesome/free-solid-svg-icons';
|
||||
import { RouterLinkActive, RouterLink } from '@angular/router';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import {RouterLink, RouterLinkActive} from '@angular/router';
|
||||
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@Component({
|
||||
selector: 'app-link',
|
||||
templateUrl: './link.component.html',
|
||||
styleUrls: ['./link.component.less'],
|
||||
imports: [
|
||||
RouterLinkActive,
|
||||
RouterLink,
|
||||
FaIconComponent,
|
||||
],
|
||||
selector: 'app-link',
|
||||
templateUrl: './link.component.html',
|
||||
styleUrls: ['./link.component.less'],
|
||||
imports: [RouterLinkActive, RouterLink, FaIconComponent],
|
||||
})
|
||||
export class LinkComponent {
|
||||
@Input() public text: string | null = null;
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('NavigationComponent', () => {
|
||||
let component: NavigationComponent;
|
||||
let fixture: ComponentFixture<NavigationComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [NavigationComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [NavigationComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NavigationComponent);
|
||||
|
||||
@@ -2,25 +2,18 @@ import {Component} from '@angular/core';
|
||||
import {faChalkboard, faMusic, faPersonBooth, faUserCog} from '@fortawesome/free-solid-svg-icons';
|
||||
import {fromEvent, Observable} from 'rxjs';
|
||||
import {distinctUntilChanged, map, shareReplay, startWith} from 'rxjs/operators';
|
||||
import { BrandComponent } from './brand/brand.component';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { RoleDirective } from '../../../../services/user/role.directive';
|
||||
import { LinkComponent } from './link/link.component';
|
||||
import { FilterComponent } from './filter/filter.component';
|
||||
import { AsyncPipe } from '@angular/common';
|
||||
import {BrandComponent} from './brand/brand.component';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {RoleDirective} from '../../../../services/user/role.directive';
|
||||
import {LinkComponent} from './link/link.component';
|
||||
import {FilterComponent} from './filter/filter.component';
|
||||
import {AsyncPipe} from '@angular/common';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navigation',
|
||||
templateUrl: './navigation.component.html',
|
||||
styleUrls: ['./navigation.component.less'],
|
||||
imports: [
|
||||
BrandComponent,
|
||||
RouterLink,
|
||||
RoleDirective,
|
||||
LinkComponent,
|
||||
FilterComponent,
|
||||
AsyncPipe,
|
||||
],
|
||||
selector: 'app-navigation',
|
||||
templateUrl: './navigation.component.html',
|
||||
styleUrls: ['./navigation.component.less'],
|
||||
imports: [BrandComponent, RouterLink, RoleDirective, LinkComponent, FilterComponent, AsyncPipe],
|
||||
})
|
||||
export class NavigationComponent {
|
||||
public faSongs = faMusic;
|
||||
@@ -32,7 +25,7 @@ export class NavigationComponent {
|
||||
map(() => window.scrollY),
|
||||
startWith(0),
|
||||
distinctUntilChanged(),
|
||||
shareReplay(1),
|
||||
shareReplay(1)
|
||||
);
|
||||
|
||||
public isNavigationHidden = (scroll: number | null): boolean => (scroll ?? 0) > 60;
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('ButtonRowComponent', () => {
|
||||
let component: ButtonRowComponent;
|
||||
let fixture: ComponentFixture<ButtonRowComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ButtonRowComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ButtonRowComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ButtonRowComponent);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-button-row',
|
||||
templateUrl: './button-row.component.html',
|
||||
styleUrls: ['./button-row.component.less'],
|
||||
selector: 'app-button-row',
|
||||
templateUrl: './button-row.component.html',
|
||||
styleUrls: ['./button-row.component.less'],
|
||||
})
|
||||
export class ButtonRowComponent {
|
||||
}
|
||||
export class ButtonRowComponent {}
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('ButtonComponent', () => {
|
||||
let component: ButtonComponent;
|
||||
let fixture: ComponentFixture<ButtonComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ButtonComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ButtonComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ButtonComponent);
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import {MatButton} from '@angular/material/button';
|
||||
import {NgIf} from '@angular/common';
|
||||
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@Component({
|
||||
selector: 'app-button',
|
||||
templateUrl: './button.component.html',
|
||||
styleUrls: ['./button.component.less'],
|
||||
imports: [
|
||||
MatButton,
|
||||
NgIf,
|
||||
FaIconComponent,
|
||||
],
|
||||
selector: 'app-button',
|
||||
templateUrl: './button.component.html',
|
||||
styleUrls: ['./button.component.less'],
|
||||
imports: [MatButton, NgIf, FaIconComponent],
|
||||
})
|
||||
export class ButtonComponent {
|
||||
@Input() public icon: IconProp | null = null;
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('CardComponent', () => {
|
||||
let component: CardComponent;
|
||||
let fixture: ComponentFixture<CardComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [CardComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [CardComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CardComponent);
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {faTimes} from '@fortawesome/free-solid-svg-icons';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import {NgIf} from '@angular/common';
|
||||
import {MatIconButton} from '@angular/material/button';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@Component({
|
||||
selector: 'app-card',
|
||||
templateUrl: './card.component.html',
|
||||
styleUrls: ['./card.component.less'],
|
||||
imports: [
|
||||
NgIf,
|
||||
MatIconButton,
|
||||
RouterLink,
|
||||
FaIconComponent,
|
||||
],
|
||||
selector: 'app-card',
|
||||
templateUrl: './card.component.html',
|
||||
styleUrls: ['./card.component.less'],
|
||||
imports: [NgIf, MatIconButton, RouterLink, FaIconComponent],
|
||||
})
|
||||
export class CardComponent {
|
||||
@Input() public padding = true;
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('ListHeaderComponent', () => {
|
||||
let component: ListHeaderComponent;
|
||||
let fixture: ComponentFixture<ListHeaderComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ListHeaderComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ListHeaderComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ListHeaderComponent);
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
||||
import {faFilter, faPlus} from '@fortawesome/free-solid-svg-icons';
|
||||
import {fade} from '../../../animations';
|
||||
import { MatIconButton } from '@angular/material/button';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { NgIf } from '@angular/common';
|
||||
import { CardComponent } from '../card/card.component';
|
||||
import {MatIconButton} from '@angular/material/button';
|
||||
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
|
||||
import {RouterLink} from '@angular/router';
|
||||
import {NgIf} from '@angular/common';
|
||||
import {CardComponent} from '../card/card.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-list-header',
|
||||
templateUrl: './list-header.component.html',
|
||||
styleUrls: ['./list-header.component.less'],
|
||||
animations: [fade],
|
||||
imports: [
|
||||
MatIconButton,
|
||||
FaIconComponent,
|
||||
RouterLink,
|
||||
NgIf,
|
||||
CardComponent,
|
||||
],
|
||||
selector: 'app-list-header',
|
||||
templateUrl: './list-header.component.html',
|
||||
styleUrls: ['./list-header.component.less'],
|
||||
animations: [fade],
|
||||
imports: [MatIconButton, FaIconComponent, RouterLink, NgIf, CardComponent],
|
||||
})
|
||||
export class ListHeaderComponent {
|
||||
public faNew = faPlus;
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('LogoComponent', () => {
|
||||
let component: LogoComponent;
|
||||
let fixture: ComponentFixture<LogoComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [LogoComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [LogoComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LogoComponent);
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import {Component} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-logo',
|
||||
templateUrl: './logo.component.html',
|
||||
styleUrls: ['./logo.component.less'],
|
||||
selector: 'app-logo',
|
||||
templateUrl: './logo.component.html',
|
||||
styleUrls: ['./logo.component.less'],
|
||||
})
|
||||
export class LogoComponent {
|
||||
}
|
||||
export class LogoComponent {}
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('MenuButtonComponent', () => {
|
||||
let component: MenuButtonComponent;
|
||||
let fixture: ComponentFixture<MenuButtonComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [MenuButtonComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [MenuButtonComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(MenuButtonComponent);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {IconProp} from '@fortawesome/fontawesome-svg-core';
|
||||
import {faCross} from '@fortawesome/free-solid-svg-icons';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import {MatButton} from '@angular/material/button';
|
||||
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
|
||||
|
||||
@Component({
|
||||
selector: 'app-menu-button',
|
||||
templateUrl: './menu-button.component.html',
|
||||
styleUrls: ['./menu-button.component.less'],
|
||||
imports: [MatButton, FaIconComponent],
|
||||
selector: 'app-menu-button',
|
||||
templateUrl: './menu-button.component.html',
|
||||
styleUrls: ['./menu-button.component.less'],
|
||||
imports: [MatButton, FaIconComponent],
|
||||
})
|
||||
export class MenuButtonComponent {
|
||||
@Input() public icon: IconProp = faCross;
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<div
|
||||
*ngFor="let line of getLines(section)"
|
||||
[class.chord]="line.type === 0"
|
||||
[class.disabled]="checkDisabled(i)"
|
||||
[class.comment]="isComment(line.text)"
|
||||
[class.disabled]="checkDisabled(i)"
|
||||
class="line"
|
||||
>{{ transform(line.text) }}
|
||||
</div>
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('SongTextComponent', () => {
|
||||
let component: SongTextComponent;
|
||||
let fixture: ComponentFixture<SongTextComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [SongTextComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [SongTextComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SongTextComponent);
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import {Directive, ElementRef, Input, OnInit} from '@angular/core';
|
||||
|
||||
@Directive({ selector: '[appAutofocus]', })
|
||||
@Directive({selector: '[appAutofocus]'})
|
||||
export class AutofocusDirective implements OnInit {
|
||||
private focus = true;
|
||||
|
||||
public constructor(private el: ElementRef<HTMLElement>) {
|
||||
}
|
||||
public constructor(private el: ElementRef<HTMLElement>) {}
|
||||
|
||||
@Input()
|
||||
public set autofocus(condition: boolean) {
|
||||
|
||||
@@ -8,8 +8,10 @@ import {map} from 'rxjs/operators';
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class RoleGuard {
|
||||
public constructor(private userService: UserService, private router: Router) {
|
||||
}
|
||||
public constructor(
|
||||
private userService: UserService,
|
||||
private router: Router
|
||||
) {}
|
||||
|
||||
public canActivate(next: ActivatedRouteSnapshot): Observable<boolean | UrlTree> {
|
||||
const requiredRoles = next.data.requiredRoles as string[];
|
||||
@@ -27,7 +29,7 @@ export class RoleGuard {
|
||||
const allowed = roles.some(s => requiredRoles.indexOf(s) !== -1);
|
||||
|
||||
return allowed || this.router.createUrlTree(this.defaultRoute(roles));
|
||||
}),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user