From 7cc905449caeed7160d51df2f814934764efbd95 Mon Sep 17 00:00:00 2001 From: smuddyx Date: Sat, 12 Jun 2021 22:02:11 +0200 Subject: [PATCH] persisting songs ins show --- .prettierrc | 2 +- src/app/modules/guest/guest.component.html | 2 +- src/app/modules/guest/guest.component.ts | 41 +++++------------ .../presentation/monitor/monitor.component.ts | 7 ++- .../presentation/remote/remote.component.ts | 2 +- .../modules/shows/services/docx.service.ts | 44 ++++--------------- .../shows/services/show-data.service.ts | 3 +- .../shows/services/show-song-data.service.ts | 12 ++--- .../shows/services/show-song.service.ts | 16 +++---- src/app/modules/shows/services/show-song.ts | 3 +- .../modules/shows/services/show.service.ts | 28 ++---------- .../modules/shows/show/show.component.html | 9 +--- .../shows/show/song/song.component.less | 1 + .../songs/services/song-data.service.ts | 6 +-- .../songs/services/text-rendering.service.ts | 4 +- .../songs/services/transpose.service.ts | 14 ++---- .../songs/song-list/song-list.component.ts | 6 +-- .../edit/edit-file/edit-file.component.ts | 6 +-- .../modules/songs/song/edit/edit.module.ts | 9 +--- src/app/modules/songs/song/new/new.module.ts | 11 +---- src/app/modules/user/user.module.ts | 13 +----- src/app/services/user/owner.directive.ts | 7 +-- .../song-text/song-text.component.ts | 8 +--- 23 files changed, 61 insertions(+), 193 deletions(-) diff --git a/.prettierrc b/.prettierrc index 3b0e330..00b5117 100644 --- a/.prettierrc +++ b/.prettierrc @@ -8,7 +8,7 @@ "bracketSpacing": false, "arrowParens": "avoid", "jsxBracketSameLine": false, - "printWidth": 120, + "printWidth": 180, "overrides": [ { "files": "*.component.html", diff --git a/src/app/modules/guest/guest.component.html b/src/app/modules/guest/guest.component.html index 246bb38..66e446d 100644 --- a/src/app/modules/guest/guest.component.html +++ b/src/app/modules/guest/guest.component.html @@ -3,7 +3,7 @@
diff --git a/src/app/modules/guest/guest.component.ts b/src/app/modules/guest/guest.component.ts index 16523a2..1705ce8 100644 --- a/src/app/modules/guest/guest.component.ts +++ b/src/app/modules/guest/guest.component.ts @@ -1,43 +1,26 @@ -import {Component, OnInit} from '@angular/core'; +import {Component} from '@angular/core'; import {SongService} from '../songs/services/song.service'; import {GlobalSettingsService} from '../../services/global-settings.service'; import {Observable} from 'rxjs'; import {filter, map, switchMap} from 'rxjs/operators'; import {ShowSongService} from '../shows/services/show-song.service'; import {GlobalSettings} from '../../services/global-settings'; -import {Song} from '../songs/services/song'; @Component({ selector: 'app-guest', templateUrl: './guest.component.html', styleUrls: ['./guest.component.less'], }) -export class GuestComponent implements OnInit { - public songs$: Observable[]> | null = null; +export class GuestComponent { + public songs$: Observable = this.globalSettingsService.get$.pipe( + filter(_ => !!_), + map(_ => _ as GlobalSettings), + map(_ => _.currentShow), + switchMap(_ => this.showSongService.list$(_)), + filter(_ => !!_), + map(_ => _), + map(_ => _.sort((x, y) => x.order - y.order).map(showSong => showSong.text)) + ); - public constructor( - private songService: SongService, - private globalSettingsService: GlobalSettingsService, - private showSongService: ShowSongService - ) {} - - public ngOnInit(): void { - this.songs$ = this.globalSettingsService.get$.pipe( - filter(_ => !!_), - map(_ => _ as GlobalSettings), - map(_ => _.currentShow), - switchMap(_ => this.showSongService.list$(_)), - filter(_ => !!_), - map(_ => _), - map(_ => - _.sort((x, y) => x.order - y.order).map(showSong => - this.songService.read$(showSong.songId).pipe( - filter(_ => !!_), - map(_ => _ as Song), - map(song => song.text) - ) - ) - ) - ); - } + public constructor(private songService: SongService, private globalSettingsService: GlobalSettingsService, private showSongService: ShowSongService) {} } diff --git a/src/app/modules/presentation/monitor/monitor.component.ts b/src/app/modules/presentation/monitor/monitor.component.ts index 4dec892..5764873 100644 --- a/src/app/modules/presentation/monitor/monitor.component.ts +++ b/src/app/modules/presentation/monitor/monitor.component.ts @@ -11,6 +11,7 @@ import {songSwitch} from '../../../widget-modules/components/song-text/animation import {TextRenderingService} from '../../songs/services/text-rendering.service'; import {Show} from '../../shows/services/show'; import {GlobalSettings} from '../../../services/global-settings'; +import {ShowSongService} from '../../shows/services/show-song.service'; @Component({ selector: 'app-monitor', @@ -28,10 +29,9 @@ export class MonitorComponent implements OnInit { public date: Date | null = null; public config$: Observable; - // private sections: Section[]; - public constructor( private showService: ShowService, + private showSongService: ShowSongService, private songService: SongService, private textRenderingService: TextRenderingService, private globalSettingsService: GlobalSettingsService, @@ -60,13 +60,12 @@ export class MonitorComponent implements OnInit { tap(_ => (this.zoom = _.presentationZoom ?? 30)) ) .pipe( - switchMap((_: Show) => this.songService.read$(_.presentationSongId)), + switchMap((_: Show) => this.showSongService.read$(_.id, _.presentationSongId)), filter(_ => !!_), map(_ => _ as Song) ) .subscribe(_ => { this.song = _; - // this.sections = this.textRenderingService.parse(_.text, null); }); } } diff --git a/src/app/modules/presentation/remote/remote.component.ts b/src/app/modules/presentation/remote/remote.component.ts index 211c9c1..70b8218 100644 --- a/src/app/modules/presentation/remote/remote.component.ts +++ b/src/app/modules/presentation/remote/remote.component.ts @@ -76,7 +76,7 @@ export class RemoteComponent { this.showService.read$(change).subscribe(_ => (this.show = _)); this.showSongService.list$(change).subscribe(_ => { this.showSongs = _; - this.presentationSongs = _.map(song => this.songs.filter(f => f.id === song.songId)[0]).map(song => ({ + this.presentationSongs = _.map(song => ({ id: song.id, title: song.title, sections: this.textRenderingService.parse(song.text, null), diff --git a/src/app/modules/shows/services/docx.service.ts b/src/app/modules/shows/services/docx.service.ts index e4672fe..960bb2c 100644 --- a/src/app/modules/shows/services/docx.service.ts +++ b/src/app/modules/shows/services/docx.service.ts @@ -63,12 +63,7 @@ export class DocxService { this.saveAs(blob, `${title}.docx`); } - private prepareNewDocument( - type: string, - name: string, - options: DownloadOptions, - sections: ISectionOptions[] - ): Document { + private prepareNewDocument(type: string, name: string, options: DownloadOptions, sections: ISectionOptions[]): Document { return new Document({ creator: name, title: type, @@ -99,24 +94,11 @@ export class DocxService { }); } - private renderSongs( - songs: {showSong: ShowSong; song: Song; sections: Section[]}[], - options: DownloadOptions, - config: Config - ): Paragraph[] { - return songs.reduce( - (p: Paragraph[], song) => [...p, ...this.renderSong(song.showSong, song.song, song.sections, options, config)], - [] - ); + private renderSongs(songs: {showSong: ShowSong; sections: Section[]}[], options: DownloadOptions, config: Config): Paragraph[] { + return songs.reduce((p: Paragraph[], song) => [...p, ...this.renderSong(song.showSong, song.showSong, song.sections, options, config)], []); } - private renderSong( - showSong: ShowSong, - song: Song, - sections: Section[], - options: DownloadOptions, - config: Config - ): Paragraph[] { + private renderSong(showSong: ShowSong, song: Song, sections: Section[], options: DownloadOptions, config: Config): Paragraph[] { const songTitle = this.renderSongTitle(song); const copyright = this.renderCopyright(song, options, config); const songText = this.renderSongText(sections, options?.chordMode ?? showSong.chordMode); @@ -148,10 +130,7 @@ export class DocxService { const artist = song.artist ? song.artist + ', ' : ''; const termsOfUse = song.termsOfUse ? song.termsOfUse + ', ' : ''; const origin = song.origin ? song.origin + ', ' : ''; - const licence = - song.legalOwner === 'CCLI' - ? 'CCLI-Liednummer: ' + song.legalOwnerId + ', CCLI-Lizenz: ' + config.ccliLicenseId - : 'CCLI-Liednummer: ' + song.legalOwnerId; + const licence = song.legalOwner === 'CCLI' ? 'CCLI-Liednummer: ' + song.legalOwnerId + ', CCLI-Lizenz: ' + config.ccliLicenseId : 'CCLI-Liednummer: ' + song.legalOwnerId; return new Paragraph({ text: artist + label + termsOfUse + origin + licence, @@ -197,7 +176,7 @@ export class DocxService { } private async prepareData(showId: string): Promise<{ - songs: {showSong: ShowSong; song: Song; sections: Section[]}[]; + songs: {showSong: ShowSong; sections: Section[]}[]; show: Show; user: User; config: Config; @@ -210,22 +189,17 @@ export class DocxService { if (!config) return null; const showSongs = await this.showSongService.list(showId); - const songsAsync = showSongs.map(async showSong => { - const song = await this.songService.read(showSong.songId); - if (!song) return null; - const sections = this.textRenderingService.parse(song.text, { + const songsAsync = showSongs.map(showSong => { + const sections = this.textRenderingService.parse(showSong.text, { baseKey: showSong.keyOriginal, targetKey: showSong.key, }); return { showSong, - song, sections, }; }); - const songs = (await Promise.all(songsAsync)) - .filter(_ => !!_) - .map(_ => _ as {showSong: ShowSong; song: Song; sections: Section[]}); + const songs = (await Promise.all(songsAsync)).filter(_ => !!_).map(_ => _ as {showSong: ShowSong; song: Song; sections: Section[]}); return {songs, show, user, config}; } diff --git a/src/app/modules/shows/services/show-data.service.ts b/src/app/modules/shows/services/show-data.service.ts index 40d4c4f..086b3b0 100644 --- a/src/app/modules/shows/services/show-data.service.ts +++ b/src/app/modules/shows/services/show-data.service.ts @@ -14,7 +14,6 @@ export class ShowDataService { public list$ = (queryFn?: QueryFn): Observable => this.dbService.col$(this.collection, queryFn); public read$ = (showId: string): Observable => this.dbService.doc$(`${this.collection}/${showId}`); - public update = async (showId: string, data: Partial): Promise => - await this.dbService.doc(`${this.collection}/${showId}`).update(data); + public update = async (showId: string, data: Partial): Promise => await this.dbService.doc(`${this.collection}/${showId}`).update(data); public add = async (data: Partial): Promise => (await this.dbService.col(this.collection).add(data)).id; } diff --git a/src/app/modules/shows/services/show-song-data.service.ts b/src/app/modules/shows/services/show-song-data.service.ts index 8b064a7..47c243b 100644 --- a/src/app/modules/shows/services/show-song-data.service.ts +++ b/src/app/modules/shows/services/show-song-data.service.ts @@ -13,14 +13,10 @@ export class ShowSongDataService { public constructor(private dbService: DbService) {} - public list$ = (showId: string, queryFn?: QueryFn): Observable => - this.dbService.col$(`${this.collection}/${showId}/${this.subCollection}`, queryFn); - public read$ = (showId: string, songId: string): Observable => - this.dbService.doc$(`${this.collection}/${showId}/${this.subCollection}/${songId}`); + public list$ = (showId: string, queryFn?: QueryFn): Observable => this.dbService.col$(`${this.collection}/${showId}/${this.subCollection}`, queryFn); + public read$ = (showId: string, songId: string): Observable => this.dbService.doc$(`${this.collection}/${showId}/${this.subCollection}/${songId}`); public update$ = async (showId: string, songId: string, data: Partial): Promise => await this.dbService.doc(`${this.collection}/${showId}/${this.subCollection}/${songId}`).update(data); - public delete = async (showId: string, songId: string): Promise => - await this.dbService.doc(`${this.collection}/${showId}/${this.subCollection}/${songId}`).delete(); - public add = async (showId: string, data: Partial): Promise => - (await this.dbService.col(`${this.collection}/${showId}/${this.subCollection}`).add(data)).id; + public delete = async (showId: string, songId: string): Promise => await this.dbService.doc(`${this.collection}/${showId}/${this.subCollection}/${songId}`).delete(); + public add = async (showId: string, data: Partial): Promise => (await this.dbService.col(`${this.collection}/${showId}/${this.subCollection}`).add(data)).id; } diff --git a/src/app/modules/shows/services/show-song.service.ts b/src/app/modules/shows/services/show-song.service.ts index 92903b8..6286913 100644 --- a/src/app/modules/shows/services/show-song.service.ts +++ b/src/app/modules/shows/services/show-song.service.ts @@ -10,17 +10,14 @@ import {UserService} from '../../../services/user/user.service'; providedIn: 'root', }) export class ShowSongService { - public constructor( - private showSongDataService: ShowSongDataService, - private songDataService: SongDataService, - private userService: UserService - ) {} + public constructor(private showSongDataService: ShowSongDataService, private songDataService: SongDataService, private userService: UserService) {} public async new$(showId: string, songId: string, order: number, addedLive = false): Promise { const song = await this.songDataService.read$(songId).pipe(take(1)).toPromise(); const user = await this.userService.user$.pipe(take(1)).toPromise(); if (!song || !user) return null; const data: Partial = { + ...song, songId, order, key: song.key, @@ -31,10 +28,11 @@ export class ShowSongService { return await this.showSongDataService.add(showId, data); } - public list$ = (showId: string): Observable => - this.showSongDataService.list$(showId, _ => _.orderBy('order')); + public read$ = (showId: string, songId: string): Observable => this.showSongDataService.read$(showId, songId); + public read = (showId: string, songId: string): Promise => this.read$(showId, songId).pipe(first()).toPromise(); + + public list$ = (showId: string): Observable => this.showSongDataService.list$(showId, _ => _.orderBy('order')); public list = (showId: string): Promise => this.list$(showId).pipe(first()).toPromise(); public delete$ = (showId: string, songId: string): Promise => this.showSongDataService.delete(showId, songId); - public update$ = async (showId: string, songId: string, data: Partial): Promise => - await this.showSongDataService.update$(showId, songId, data); + public update$ = async (showId: string, songId: string, data: Partial): Promise => await this.showSongDataService.update$(showId, songId, data); } diff --git a/src/app/modules/shows/services/show-song.ts b/src/app/modules/shows/services/show-song.ts index 4b64f0c..4de8be3 100644 --- a/src/app/modules/shows/services/show-song.ts +++ b/src/app/modules/shows/services/show-song.ts @@ -1,6 +1,7 @@ import {ChordMode} from '../../../widget-modules/components/song-text/song-text.component'; +import {Song} from '../../songs/services/song'; -export interface ShowSong { +export interface ShowSong extends Song { id: string; songId: string; key: string; diff --git a/src/app/modules/shows/services/show.service.ts b/src/app/modules/shows/services/show.service.ts index 3a9c324..4db0ae5 100644 --- a/src/app/modules/shows/services/show.service.ts +++ b/src/app/modules/shows/services/show.service.ts @@ -10,25 +10,8 @@ import {User} from '../../../services/user/user'; providedIn: 'root', }) export class ShowService { - public static SHOW_TYPE = [ - 'service-worship', - 'service-praise', - 'home-group-big', - 'home-group', - 'prayer-group', - 'teens-group', - 'kids-group', - 'misc-public', - 'misc-private', - ]; - public static SHOW_TYPE_PUBLIC = [ - 'service-worship', - 'service-praise', - 'home-group-big', - 'teens-group', - 'kids-group', - 'misc-public', - ]; + public static SHOW_TYPE = ['service-worship', 'service-praise', 'home-group-big', 'home-group', 'prayer-group', 'teens-group', 'kids-group', 'misc-public', 'misc-private']; + public static SHOW_TYPE_PUBLIC = ['service-worship', 'service-praise', 'home-group-big', 'teens-group', 'kids-group', 'misc-public']; public static SHOW_TYPE_PRIVATE = ['home-group', 'prayer-group', 'misc-private']; private user: User | null = null; @@ -44,14 +27,11 @@ export class ShowService { () => this.showDataService.list$(), (user: User | null, shows: Show[]) => ({user, shows}) ), - map(s => - s.shows.filter(_ => !_.archived).filter(show => show.published || (show.owner === s.user?.id && !publishedOnly)) - ) + map(s => s.shows.filter(_ => !_.archived).filter(show => show.published || (show.owner === s.user?.id && !publishedOnly))) ); } - public update$ = async (showId: string, data: Partial): Promise => - this.showDataService.update(showId, data); + public update$ = async (showId: string, data: Partial): Promise => this.showDataService.update(showId, data); public async new$(data: Partial): Promise { if (!data.showType || !this.user) return null; diff --git a/src/app/modules/shows/show/show.component.html b/src/app/modules/shows/show/show.component.html index df38b52..6d772a2 100644 --- a/src/app/modules/shows/show/show.component.html +++ b/src/app/modules/shows/show/show.component.html @@ -5,12 +5,7 @@ show.date.toDate() | date: 'dd.MM.yyyy' }} - {{ getStatus(show) }}" > - öffentliche Veranstaltung von - - - geschlossene Veranstaltung von + {{show.public ? 'öffentliche' : 'geschlossene'}} Veranstaltung von

@@ -19,7 +14,7 @@

=> this.dbService.col$(this.collection); public read$ = (songId: string): Observable => this.dbService.doc$(this.collection + '/' + songId); - public update$ = async (songId: string, data: Partial): Promise => - await this.dbService.doc(this.collection + '/' + songId).update(data); + public update$ = async (songId: string, data: Partial): Promise => await this.dbService.doc(this.collection + '/' + songId).update(data); public add = async (data: Partial): Promise => (await this.dbService.col(this.collection).add(data)).id; - public delete = async (songId: string): Promise => - await this.dbService.doc(this.collection + '/' + songId).delete(); + public delete = async (songId: string): Promise => await this.dbService.doc(this.collection + '/' + songId).delete(); } diff --git a/src/app/modules/songs/services/text-rendering.service.ts b/src/app/modules/songs/services/text-rendering.service.ts index 3f5bb2e..9d930ee 100644 --- a/src/app/modules/songs/services/text-rendering.service.ts +++ b/src/app/modules/songs/services/text-rendering.service.ts @@ -49,9 +49,7 @@ export class TextRenderingService { const type = hasMatches ? LineType.chord : LineType.text; const line: Line = {type, text, chords: hasMatches ? cords : null}; - return transpose !== null && transpose !== undefined - ? this.transposeService.transpose(line, transpose.baseKey, transpose.targetKey) - : this.transposeService.renderChords(line); + return transpose !== null && transpose !== undefined ? this.transposeService.transpose(line, transpose.baseKey, transpose.targetKey) : this.transposeService.renderChords(line); } private getSectionTypeOfLine(line: string): SectionType | null { diff --git a/src/app/modules/songs/services/transpose.service.ts b/src/app/modules/songs/services/transpose.service.ts index 9ece049..ef30827 100644 --- a/src/app/modules/songs/services/transpose.service.ts +++ b/src/app/modules/songs/services/transpose.service.ts @@ -33,10 +33,7 @@ export class TransposeService { public getDistance(baseKey: string, targetKey: string): number { const scale = getScaleType(baseKey); - return scale - ? (scale[0].indexOf(targetKey) - scale[0].indexOf(baseKey) ?? - scale[1].indexOf(targetKey) - scale[1].indexOf(baseKey)) % 12 - : 0; + return scale ? (scale[0].indexOf(targetKey) - scale[0].indexOf(baseKey) ?? scale[1].indexOf(targetKey) - scale[1].indexOf(baseKey)) % 12 : 0; } public getMap(baseKey: string, difference: number): TransposeMap | null { @@ -74,8 +71,7 @@ export class TransposeService { } private renderLine(chords: Chord[]): string { - let template = - ' '; + let template = ' '; chords.forEach(chord => { const pos = chord.position; @@ -92,10 +88,6 @@ export class TransposeService { } private renderChord(chord: Chord) { - return ( - scaleMapping[chord.chord] + - (chord.add ? chord.add : '') + - (chord.slashChord ? '/' + scaleMapping[chord.slashChord] : '') - ); + return scaleMapping[chord.chord] + (chord.add ? chord.add : '') + (chord.slashChord ? '/' + scaleMapping[chord.slashChord] : ''); } } diff --git a/src/app/modules/songs/song-list/song-list.component.ts b/src/app/modules/songs/song-list/song-list.component.ts index 5db9f8f..6606704 100644 --- a/src/app/modules/songs/song-list/song-list.component.ts +++ b/src/app/modules/songs/song-list/song-list.component.ts @@ -20,11 +20,7 @@ export class SongListComponent implements OnInit, OnDestroy { public songs$: Observable | null = null; public anyFilterActive = false; - public constructor( - private songService: SongService, - private activatedRoute: ActivatedRoute, - private scrollService: ScrollService - ) {} + public constructor(private songService: SongService, private activatedRoute: ActivatedRoute, private scrollService: ScrollService) {} public ngOnInit(): void { const filter$ = this.activatedRoute.queryParams.pipe( diff --git a/src/app/modules/songs/song/edit/edit-file/edit-file.component.ts b/src/app/modules/songs/song/edit/edit-file/edit-file.component.ts index 744eb5e..c5467d4 100644 --- a/src/app/modules/songs/song/edit/edit-file/edit-file.component.ts +++ b/src/app/modules/songs/song/edit/edit-file/edit-file.component.ts @@ -18,11 +18,7 @@ export class EditFileComponent { public songId: string | null = null; public files$: Observable; - public constructor( - private activatedRoute: ActivatedRoute, - private uploadService: UploadService, - private fileService: FileDataService - ) { + public constructor(private activatedRoute: ActivatedRoute, private uploadService: UploadService, private fileService: FileDataService) { this.activatedRoute.params .pipe( map(param => param as {songId: string}), diff --git a/src/app/modules/songs/song/edit/edit.module.ts b/src/app/modules/songs/song/edit/edit.module.ts index 71a20e1..64e54f6 100644 --- a/src/app/modules/songs/song/edit/edit.module.ts +++ b/src/app/modules/songs/song/edit/edit.module.ts @@ -28,14 +28,7 @@ import {HistoryComponent} from './history/history.component'; import {SongTextModule} from '../../../../widget-modules/components/song-text/song-text.module'; @NgModule({ - declarations: [ - EditComponent, - EditSongComponent, - EditFileComponent, - FileComponent, - SaveDialogComponent, - HistoryComponent, - ], + declarations: [EditComponent, EditSongComponent, EditFileComponent, FileComponent, SaveDialogComponent, HistoryComponent], exports: [EditComponent], bootstrap: [SaveDialogComponent], imports: [ diff --git a/src/app/modules/songs/song/new/new.module.ts b/src/app/modules/songs/song/new/new.module.ts index fe9135b..7cebdf3 100644 --- a/src/app/modules/songs/song/new/new.module.ts +++ b/src/app/modules/songs/song/new/new.module.ts @@ -11,15 +11,6 @@ import {AutofocusModule} from '../../../../widget-modules/directives/autofocus/a @NgModule({ declarations: [NewComponent], - imports: [ - CommonModule, - CardModule, - ReactiveFormsModule, - MatFormFieldModule, - MatInputModule, - ButtonRowModule, - ButtonModule, - AutofocusModule, - ], + imports: [CommonModule, CardModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, ButtonRowModule, ButtonModule, AutofocusModule], }) export class NewModule {} diff --git a/src/app/modules/user/user.module.ts b/src/app/modules/user/user.module.ts index 7f60cfe..e572c88 100644 --- a/src/app/modules/user/user.module.ts +++ b/src/app/modules/user/user.module.ts @@ -24,18 +24,7 @@ import {LogoModule} from '../../widget-modules/components/logo/logo.module'; import {FontAwesomeModule} from '@fortawesome/angular-fontawesome'; @NgModule({ - declarations: [ - LoginComponent, - AuthMessagePipe, - InfoComponent, - LogoutComponent, - RolePipe, - PasswordComponent, - PasswordSendComponent, - UsersComponent, - UserComponent, - NewComponent, - ], + declarations: [LoginComponent, AuthMessagePipe, InfoComponent, LogoutComponent, RolePipe, PasswordComponent, PasswordSendComponent, UsersComponent, UserComponent, NewComponent], imports: [ CommonModule, UserRoutingModule, diff --git a/src/app/services/user/owner.directive.ts b/src/app/services/user/owner.directive.ts index 1cd71a1..d60ed3b 100644 --- a/src/app/services/user/owner.directive.ts +++ b/src/app/services/user/owner.directive.ts @@ -8,12 +8,7 @@ export class OwnerDirective implements OnInit { private currentUserId: string | null = null; private iAppOwner: string | null = null; - public constructor( - private element: ElementRef, - private templateRef: TemplateRef, - private viewContainer: ViewContainerRef, - private userService: UserService - ) {} + public constructor(private element: ElementRef, private templateRef: TemplateRef, private viewContainer: ViewContainerRef, private userService: UserService) {} @Input() public set appOwner(value: string) { diff --git a/src/app/widget-modules/components/song-text/song-text.component.ts b/src/app/widget-modules/components/song-text/song-text.component.ts index 3b6d88b..f5e199e 100644 --- a/src/app/widget-modules/components/song-text/song-text.component.ts +++ b/src/app/widget-modules/components/song-text/song-text.component.ts @@ -52,13 +52,7 @@ export class SongTextComponent implements OnInit { this.offset = 0; this.sections = []; if (this.fullscreen) { - setTimeout( - () => - (this.sections = this.textRenderingService - .parse(this.iText, this.iTranspose) - .sort((a, b) => a.type - b.type)), - 100 - ); + setTimeout(() => (this.sections = this.textRenderingService.parse(this.iText, this.iTranspose).sort((a, b) => a.type - b.type)), 100); } else { this.sections = this.textRenderingService.parse(this.iText, this.iTranspose).sort((a, b) => a.type - b.type); }