user preferences - chord type - apply in song and show-song

This commit is contained in:
2020-03-22 15:32:18 +01:00
committed by smuddy
parent aa57dc2ce3
commit a1c750b3c8
10 changed files with 39 additions and 14 deletions

View File

@@ -13,5 +13,6 @@
</span>
<app-menu-button (click)="onDelete()" [icon]="faDelete" class="btnDelete"></app-menu-button>
</div>
<app-song-text *ngIf="showText" [text]="_song.text"></app-song-text>
<app-song-text (chordModeChanged)="onChordModeChanged($event)" *ngIf="showText" [chordMode]="showSong.chordMode"
[text]="_song.text"></app-song-text>
</div>

View File

@@ -7,6 +7,7 @@ import {ShowSongService} from '../../services/show-song.service';
import {ShowSong} from '../../services/showSong';
import {getScale} from '../../../songs/services/key.helper';
import {FormControl} from '@angular/forms';
import {ChordMode} from '../../../../widget-modules/components/song-text/song-text.component';
@Component({
selector: 'app-song',
@@ -77,5 +78,7 @@ export class SongComponent implements OnInit {
await this.showSongService.update$(this.showId, toggleSong.id, {order: song.order});
}
public async onChordModeChanged(value: ChordMode): Promise<void> {
await this.showSongService.update$(this.showId, this.showSong.id, {chordMode: value});
}
}