bugfixing
This commit is contained in:
@@ -35,14 +35,14 @@ export class AddSongComponent {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
})
|
||||
});
|
||||
|
||||
const filterValue = this.filteredSongsControl.value;
|
||||
return filterValue ? songs.filter(_ => filterSong(_, filterValue)) : songs;
|
||||
}
|
||||
|
||||
public async onAddSongSelectionChanged(event: MatSelectChange) {
|
||||
let order = this.showSongs.reduce((oa, u) => Math.max(oa, u.order), 0) + 1;
|
||||
const order = this.showSongs.reduce((oa, u) => Math.max(oa, u.order), 0) + 1;
|
||||
await this.showSongService.new$(this.showId, event.value, order, this.addedLive);
|
||||
event.source.value = null;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,10 @@ export class FilterComponent {
|
||||
|
||||
constructor(private router: Router, activatedRoute: ActivatedRoute) {
|
||||
activatedRoute.queryParams.subscribe(_ => {
|
||||
if (_.q) this.value = _.q;
|
||||
})
|
||||
if (_.q) {
|
||||
this.value = _.q;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public async valueChange(text: string): Promise<void> {
|
||||
|
||||
@@ -17,4 +17,4 @@ export const songSwitch = // the fade-in/fade-out animation.
|
||||
transition(':leave',
|
||||
animate(1200, style({opacity: 0}))
|
||||
)
|
||||
])
|
||||
]);
|
||||
|
||||
@@ -8,7 +8,7 @@ import {LineType} from '../../../modules/songs/services/line-type';
|
||||
import {Section} from '../../../modules/songs/services/section';
|
||||
import {Line} from '../../../modules/songs/services/line';
|
||||
|
||||
export type ChordMode = 'show' | 'hide' | 'onlyFirst'
|
||||
export type ChordMode = 'show' | 'hide' | 'onlyFirst';
|
||||
|
||||
@Component({
|
||||
selector: 'app-song-text',
|
||||
@@ -41,10 +41,12 @@ export class SongTextComponent implements OnInit {
|
||||
public set text(value: string) {
|
||||
this.sections = null;
|
||||
this.offset = 0;
|
||||
if (this.fullscreen)
|
||||
if (this.fullscreen) {
|
||||
setTimeout(() =>
|
||||
this.sections = this.textRenderingService.parse(value, this.transpose).sort((a, b) => a.type - b.type), 100);
|
||||
else this.sections = this.textRenderingService.parse(value, this.transpose).sort((a, b) => a.type - b.type)
|
||||
} else {
|
||||
this.sections = this.textRenderingService.parse(value, this.transpose).sort((a, b) => a.type - b.type);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +63,9 @@ export class SongTextComponent implements OnInit {
|
||||
|
||||
public getLines(section: Section): Line[] {
|
||||
return section.lines.filter(_ => {
|
||||
if (_.type !== LineType.chord) return true;
|
||||
if (_.type !== LineType.chord) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (this._chordMode) {
|
||||
case 'show':
|
||||
|
||||
Reference in New Issue
Block a user