update npm version
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<div *ngIf="songs$ | async as songs" class="view">
|
||||
<swiper>
|
||||
<div *ngFor="let song of songs" class="song">
|
||||
<app-song-text
|
||||
[showSwitch]="false"
|
||||
[text]="song"
|
||||
chordMode="hide"
|
||||
></app-song-text>
|
||||
</div>
|
||||
</swiper>
|
||||
<!-- <swiper>-->
|
||||
<!-- <div *ngFor="let song of songs" class="song">-->
|
||||
<!-- <app-song-text-->
|
||||
<!-- [showSwitch]="false"-->
|
||||
<!-- [text]="song"-->
|
||||
<!-- chordMode="hide"-->
|
||||
<!-- ></app-song-text>-->
|
||||
<!-- </div>-->
|
||||
<!-- </swiper>-->
|
||||
</div>
|
||||
|
||||
@@ -2,27 +2,10 @@ import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {GuestComponent} from './guest.component';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {SWIPER_CONFIG, SwiperConfigInterface, SwiperModule} from 'ngx-swiper-wrapper';
|
||||
import {SongTextModule} from '../../widget-modules/components/song-text/song-text.module';
|
||||
|
||||
const DEFAULT_SWIPER_CONFIG: SwiperConfigInterface = {
|
||||
direction: 'horizontal',
|
||||
slidesPerView: 1,
|
||||
keyboard: true,
|
||||
mousewheel: true,
|
||||
scrollbar: false,
|
||||
navigation: true,
|
||||
pagination: false,
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
declarations: [GuestComponent],
|
||||
imports: [CommonModule, RouterModule.forChild([{path: '', component: GuestComponent}]), SwiperModule, SongTextModule],
|
||||
providers: [
|
||||
{
|
||||
provide: SWIPER_CONFIG,
|
||||
useValue: DEFAULT_SWIPER_CONFIG,
|
||||
},
|
||||
],
|
||||
imports: [CommonModule, RouterModule.forChild([{path: '', component: GuestComponent}]), SongTextModule],
|
||||
})
|
||||
export class GuestModule {}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<ng-container *ngIf="shows$ | async as shows">
|
||||
<app-card
|
||||
*ngIf="getPrivateSongs(shows).length > 0"
|
||||
[@fade]
|
||||
@fade
|
||||
[padding]="false"
|
||||
heading="meine Veranstaltungen"
|
||||
>
|
||||
@@ -21,12 +21,12 @@
|
||||
<ng-container *ngIf="shows$ | async as shows">
|
||||
<app-card
|
||||
*ngIf="getPublicShows(shows).length > 0"
|
||||
[@fade]
|
||||
@fade
|
||||
[padding]="false"
|
||||
heading="veröffentlichte Veranstaltungen"
|
||||
>
|
||||
<app-list-item
|
||||
*ngFor="let show of getPublicShows(shows) | sortBy: 'desc':'date'"
|
||||
*ngFor="let show of getPublicShows(shows) | sortBy: 'desc':'date'; trackBy: trackBy"
|
||||
[routerLink]="show.id"
|
||||
[show]="show"
|
||||
></app-list-item>
|
||||
|
||||
@@ -24,4 +24,6 @@ export class ListComponent {
|
||||
public getPrivateSongs(songs: Show[]): Show[] {
|
||||
return songs.filter(_ => !_.published);
|
||||
}
|
||||
|
||||
public trackBy = (index: number, show: unknown) => (show as Show).id;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</p>
|
||||
<div *ngIf="showSongs" class="song-list" cdkDropList [cdkDropListDisabled]="show.published"
|
||||
(cdkDropListDropped)="drop($event, show)">
|
||||
<div *ngFor="let song of orderedShowSongs(show); let i = index" class="song-row" cdkDrag>
|
||||
<div *ngFor="let song of orderedShowSongs(show); let i = index; trackBy: trackBy" class="song-row" cdkDrag>
|
||||
<app-song
|
||||
[showSong]="song"
|
||||
[showId]="showId"
|
||||
|
||||
@@ -115,4 +115,6 @@ export class ShowComponent implements OnInit {
|
||||
if (!list) return [];
|
||||
return show.order.map(_ => list.filter(f => f.id === _)[0]);
|
||||
}
|
||||
|
||||
public trackBy = (index: number, show: ShowSong) => show.id;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div *ngIf="songs$ | async as songs" [@fade]>
|
||||
<div *ngIf="songs$ | async as songs" @fade>
|
||||
<app-list-header [anyFilterActive]="anyFilterActive">
|
||||
<app-filter [songs]="songs" route="songs"></app-filter>
|
||||
</app-list-header>
|
||||
|
||||
<app-card [padding]="false">
|
||||
<app-list-item
|
||||
*ngFor="let song of songs"
|
||||
*ngFor="let song of songs; trackBy: trackBy"
|
||||
[routerLink]="song.id"
|
||||
[song]="song"
|
||||
></app-list-item>
|
||||
|
||||
@@ -73,4 +73,5 @@ export class SongListComponent implements OnInit, OnDestroy {
|
||||
|
||||
return flagStrings.indexOf(flag) !== -1;
|
||||
}
|
||||
public trackBy = (index: number, show: Song) => show.id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user