clean up and lint files
This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
matTooltip="Swiper umschalten"></app-menu-button>
|
||||
</div>
|
||||
</div>
|
||||
<div (cdkDropListDropped)="drop($event, show)" *ngIf="showSongs && !useSwiper" [cdkDropListDisabled]="show.published || showText"
|
||||
<div (cdkDropListDropped)="drop($event, show)" *ngIf="showSongs && !useSwiper"
|
||||
[cdkDropListDisabled]="show.published || showText"
|
||||
[style.cursor]="!(show.published || showText) ? 'drag' : 'inherit'"
|
||||
[style.font-size]="textSize + 'em'"
|
||||
cdkDropList
|
||||
@@ -52,7 +53,9 @@
|
||||
[showText]="true"
|
||||
[show]="show"
|
||||
></app-song>
|
||||
<div class="next-song" *ngIf="getNextSong(orderedShowSongs(show), i) as next">{{next}}<fa-icon [icon]="faNextSong"></fa-icon></div>
|
||||
<div *ngIf="getNextSong(orderedShowSongs(show), i) as next" class="next-song">{{ next }}
|
||||
<fa-icon [icon]="faNextSong"></fa-icon>
|
||||
</div>
|
||||
</swiper-slide>
|
||||
</swiper-container>
|
||||
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('ShowComponent', () => {
|
||||
let component: ShowComponent;
|
||||
let fixture: ComponentFixture<ShowComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ShowComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [ShowComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ShowComponent);
|
||||
|
||||
@@ -25,60 +25,60 @@ import {
|
||||
faUser,
|
||||
faUsers,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import { CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
|
||||
import {CdkDrag, CdkDragDrop, CdkDropList, moveItemInArray} from '@angular/cdk/drag-drop';
|
||||
import {fade} from '../../../animations';
|
||||
import {MatDialog} from '@angular/material/dialog';
|
||||
import {ArchiveDialogComponent} from '../dialog/archive-dialog/archive-dialog.component';
|
||||
import {closeFullscreen, openFullscreen} from '../../../services/fullscreen';
|
||||
import {GuestShowService} from '../../guest/guest-show.service';
|
||||
import {ShareDialogComponent} from '../dialog/share-dialog/share-dialog.component';
|
||||
import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common';
|
||||
import { CardComponent } from '../../../widget-modules/components/card/card.component';
|
||||
import { UserNameComponent } from '../../../services/user/user-name/user-name.component';
|
||||
import { MatCheckbox } from '@angular/material/checkbox';
|
||||
import { ReactiveFormsModule, FormsModule } from '@angular/forms';
|
||||
import { MenuButtonComponent } from '../../../widget-modules/components/menu-button/menu-button.component';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { SongComponent } from './song/song.component';
|
||||
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
||||
import { AddSongComponent } from '../../../widget-modules/components/add-song/add-song.component';
|
||||
import { ButtonRowComponent } from '../../../widget-modules/components/button-row/button-row.component';
|
||||
import { RoleDirective } from '../../../services/user/role.directive';
|
||||
import { OwnerDirective } from '../../../services/user/owner.directive';
|
||||
import { ButtonComponent } from '../../../widget-modules/components/button/button.component';
|
||||
import { MatMenuTrigger, MatMenu } from '@angular/material/menu';
|
||||
import { ShowTypePipe } from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||
import {AsyncPipe, DatePipe, NgFor, NgIf} from '@angular/common';
|
||||
import {CardComponent} from '../../../widget-modules/components/card/card.component';
|
||||
import {UserNameComponent} from '../../../services/user/user-name/user-name.component';
|
||||
import {MatCheckbox} from '@angular/material/checkbox';
|
||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||
import {MenuButtonComponent} from '../../../widget-modules/components/menu-button/menu-button.component';
|
||||
import {MatTooltip} from '@angular/material/tooltip';
|
||||
import {SongComponent} from './song/song.component';
|
||||
import {FaIconComponent} from '@fortawesome/angular-fontawesome';
|
||||
import {AddSongComponent} from '../../../widget-modules/components/add-song/add-song.component';
|
||||
import {ButtonRowComponent} from '../../../widget-modules/components/button-row/button-row.component';
|
||||
import {RoleDirective} from '../../../services/user/role.directive';
|
||||
import {OwnerDirective} from '../../../services/user/owner.directive';
|
||||
import {ButtonComponent} from '../../../widget-modules/components/button/button.component';
|
||||
import {MatMenu, MatMenuTrigger} from '@angular/material/menu';
|
||||
import {ShowTypePipe} from '../../../widget-modules/pipes/show-type-translater/show-type.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-show',
|
||||
templateUrl: './show.component.html',
|
||||
styleUrls: ['./show.component.less'],
|
||||
animations: [fade],
|
||||
imports: [
|
||||
NgIf,
|
||||
CardComponent,
|
||||
UserNameComponent,
|
||||
MatCheckbox,
|
||||
ReactiveFormsModule,
|
||||
FormsModule,
|
||||
MenuButtonComponent,
|
||||
MatTooltip,
|
||||
CdkDropList,
|
||||
NgFor,
|
||||
CdkDrag,
|
||||
SongComponent,
|
||||
FaIconComponent,
|
||||
AddSongComponent,
|
||||
ButtonRowComponent,
|
||||
RoleDirective,
|
||||
OwnerDirective,
|
||||
ButtonComponent,
|
||||
MatMenuTrigger,
|
||||
MatMenu,
|
||||
AsyncPipe,
|
||||
DatePipe,
|
||||
ShowTypePipe,
|
||||
],
|
||||
selector: 'app-show',
|
||||
templateUrl: './show.component.html',
|
||||
styleUrls: ['./show.component.less'],
|
||||
animations: [fade],
|
||||
imports: [
|
||||
NgIf,
|
||||
CardComponent,
|
||||
UserNameComponent,
|
||||
MatCheckbox,
|
||||
ReactiveFormsModule,
|
||||
FormsModule,
|
||||
MenuButtonComponent,
|
||||
MatTooltip,
|
||||
CdkDropList,
|
||||
NgFor,
|
||||
CdkDrag,
|
||||
SongComponent,
|
||||
FaIconComponent,
|
||||
AddSongComponent,
|
||||
ButtonRowComponent,
|
||||
RoleDirective,
|
||||
OwnerDirective,
|
||||
ButtonComponent,
|
||||
MatMenuTrigger,
|
||||
MatMenu,
|
||||
AsyncPipe,
|
||||
DatePipe,
|
||||
ShowTypePipe,
|
||||
],
|
||||
})
|
||||
export class ShowComponent implements OnInit, OnDestroy {
|
||||
public show$: Observable<Show | null> | null = null;
|
||||
@@ -114,16 +114,15 @@ export class ShowComponent implements OnInit, OnDestroy {
|
||||
private router: Router,
|
||||
private cRef: ChangeDetectorRef,
|
||||
public dialog: MatDialog,
|
||||
private guestShowService: GuestShowService,
|
||||
) {
|
||||
}
|
||||
private guestShowService: GuestShowService
|
||||
) {}
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.show$ = this.activatedRoute.params.pipe(
|
||||
map(param => param as {showId: string}),
|
||||
map(param => param.showId),
|
||||
tap((_: string) => (this.showId = _)),
|
||||
switchMap((showId: string) => this.showService.read$(showId)),
|
||||
switchMap((showId: string) => this.showService.read$(showId))
|
||||
);
|
||||
this.subs.push(
|
||||
this.activatedRoute.params
|
||||
@@ -131,7 +130,7 @@ export class ShowComponent implements OnInit, OnDestroy {
|
||||
map(param => param as {showId: string}),
|
||||
map(param => param.showId),
|
||||
switchMap(showId => this.showSongService.list$(showId)),
|
||||
filter(_ => !!_ && _.length > 0),
|
||||
filter(_ => !!_ && _.length > 0)
|
||||
)
|
||||
.subscribe(_ => {
|
||||
this.showSongs = _;
|
||||
@@ -143,7 +142,7 @@ export class ShowComponent implements OnInit, OnDestroy {
|
||||
.subscribe(_ => {
|
||||
this.songs = _;
|
||||
this.cRef.markForCheck();
|
||||
}),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,13 +6,11 @@ describe('SongComponent', () => {
|
||||
let component: SongComponent;
|
||||
let fixture: ComponentFixture<SongComponent>;
|
||||
|
||||
beforeEach(
|
||||
waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [SongComponent],
|
||||
}).compileComponents();
|
||||
}),
|
||||
);
|
||||
beforeEach(waitForAsync(() => {
|
||||
void TestBed.configureTestingModule({
|
||||
imports: [SongComponent],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SongComponent);
|
||||
|
||||
@@ -2,43 +2,43 @@ import {Component, Input, OnInit, ViewChild} from '@angular/core';
|
||||
import {ShowSongService} from '../../services/show-song.service';
|
||||
import {ShowSong} from '../../services/show-song';
|
||||
import {getScale} from '../../../songs/services/key.helper';
|
||||
import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ChordMode, SongTextComponent } from '../../../../widget-modules/components/song-text/song-text.component';
|
||||
import {ReactiveFormsModule, UntypedFormControl} from '@angular/forms';
|
||||
import {ChordMode, SongTextComponent} from '../../../../widget-modules/components/song-text/song-text.component';
|
||||
import {Show} from '../../services/show';
|
||||
import {faEraser, faPenToSquare, faSave, faTrash} from '@fortawesome/free-solid-svg-icons';
|
||||
import {fade} from '../../../../animations';
|
||||
import {MatSelect} from '@angular/material/select';
|
||||
import { NgIf, NgFor } from '@angular/common';
|
||||
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||
import { MatOption } from '@angular/material/core';
|
||||
import { MenuButtonComponent } from '../../../../widget-modules/components/menu-button/menu-button.component';
|
||||
import { MatTooltip } from '@angular/material/tooltip';
|
||||
import { MatInput } from '@angular/material/input';
|
||||
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
||||
import { ButtonRowComponent } from '../../../../widget-modules/components/button-row/button-row.component';
|
||||
import { ButtonComponent } from '../../../../widget-modules/components/button/button.component';
|
||||
import {NgFor, NgIf} from '@angular/common';
|
||||
import {MatFormField, MatLabel} from '@angular/material/form-field';
|
||||
import {MatOption} from '@angular/material/core';
|
||||
import {MenuButtonComponent} from '../../../../widget-modules/components/menu-button/menu-button.component';
|
||||
import {MatTooltip} from '@angular/material/tooltip';
|
||||
import {MatInput} from '@angular/material/input';
|
||||
import {CdkTextareaAutosize} from '@angular/cdk/text-field';
|
||||
import {ButtonRowComponent} from '../../../../widget-modules/components/button-row/button-row.component';
|
||||
import {ButtonComponent} from '../../../../widget-modules/components/button/button.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-song',
|
||||
templateUrl: './song.component.html',
|
||||
styleUrls: ['./song.component.less'],
|
||||
animations: [fade],
|
||||
imports: [
|
||||
NgIf,
|
||||
MatFormField,
|
||||
MatSelect,
|
||||
ReactiveFormsModule,
|
||||
NgFor,
|
||||
MatOption,
|
||||
MenuButtonComponent,
|
||||
MatTooltip,
|
||||
MatLabel,
|
||||
MatInput,
|
||||
CdkTextareaAutosize,
|
||||
ButtonRowComponent,
|
||||
ButtonComponent,
|
||||
SongTextComponent,
|
||||
],
|
||||
selector: 'app-song',
|
||||
templateUrl: './song.component.html',
|
||||
styleUrls: ['./song.component.less'],
|
||||
animations: [fade],
|
||||
imports: [
|
||||
NgIf,
|
||||
MatFormField,
|
||||
MatSelect,
|
||||
ReactiveFormsModule,
|
||||
NgFor,
|
||||
MatOption,
|
||||
MenuButtonComponent,
|
||||
MatTooltip,
|
||||
MatLabel,
|
||||
MatInput,
|
||||
CdkTextareaAutosize,
|
||||
ButtonRowComponent,
|
||||
ButtonComponent,
|
||||
SongTextComponent,
|
||||
],
|
||||
})
|
||||
export class SongComponent implements OnInit {
|
||||
@Input() public show: Show | null = null;
|
||||
@@ -57,8 +57,7 @@ export class SongComponent implements OnInit {
|
||||
public editSongControl = new UntypedFormControl();
|
||||
@ViewChild('option') private keyOptions: MatSelect;
|
||||
|
||||
public constructor(private showSongService: ShowSongService) {
|
||||
}
|
||||
public constructor(private showSongService: ShowSongService) {}
|
||||
|
||||
@Input()
|
||||
public set showSong(song: ShowSong) {
|
||||
|
||||
Reference in New Issue
Block a user