fix: song details
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -264,4 +264,7 @@ __pycache__/
|
|||||||
*/*/App_Data/*
|
*/*/App_Data/*
|
||||||
|
|
||||||
# Mac
|
# Mac
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# Angular
|
||||||
|
dist
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<mat-card-title>{{ song.Name }}</mat-card-title>
|
<mat-card-title>{{ song.Name }}</mat-card-title>
|
||||||
<mat-card-subtitle>{{ song.Key }} - {{ song.Velocity }}</mat-card-subtitle>
|
<mat-card-subtitle>{{ song.Key }} - {{ song.Tempo }}</mat-card-subtitle>
|
||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<p>{{ song.Text }}</p>
|
<p *ngFor="let line of text">{{ line }}</p>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions>
|
<mat-card-actions>
|
||||||
<button mat-button (click)="onClickDownload()">Herunterladen</button>
|
<button mat-button (click)="onClickDownload()">Herunterladen</button>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { DownloadService } from './../../data/download.service';
|
import { DownloadService } from "./../../data/download.service";
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from "@angular/router";
|
||||||
import { faLongArrowAltLeft } from '@fortawesome/free-solid-svg-icons';
|
import { faLongArrowAltLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { Song } from 'src/app/models/song.model';
|
import { Song } from "src/app/models/song.model";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-song',
|
selector: "app-song",
|
||||||
templateUrl: './song.component.html',
|
templateUrl: "./song.component.html",
|
||||||
styleUrls: ['./song.component.less']
|
styleUrls: ["./song.component.less"]
|
||||||
})
|
})
|
||||||
export class SongComponent implements OnInit {
|
export class SongComponent implements OnInit {
|
||||||
public song: Song;
|
public song: Song;
|
||||||
@@ -28,4 +28,8 @@ export class SongComponent implements OnInit {
|
|||||||
const id = this.song.ID;
|
const id = this.song.ID;
|
||||||
this.downloadService.get(id, false);
|
this.downloadService.get(id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get text(): string[] {
|
||||||
|
return this.song.Text.split(/\r?\n/).filter(_ => _ !== ' ');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user