websockets for tracks and ui improvement

This commit is contained in:
raiper34
2024-07-10 23:08:05 +02:00
parent 3455db8d71
commit 2f0e4626f8
22 changed files with 389 additions and 101 deletions
@@ -0,0 +1,26 @@
import {Component, Input} from '@angular/core';
import {CommonModule, NgFor, NgSwitch, NgSwitchCase} from "@angular/common";
import {Track, TrackService, TrackStatusEnum} from "../../services/track.service";
import {Observable} from "rxjs";
@Component({
selector: 'app-track-list',
standalone: true,
imports: [CommonModule, NgFor, NgSwitch, NgSwitchCase],
templateUrl: './track-list.component.html',
styleUrl: './track-list.component.scss'
})
export class TrackListComponent {
@Input() set playlistId(value: number) {
console.log(value);
this.tracks$ = this.service.getAllByPlaylist(value);
}
tracks$!: Observable<Track[]>;
trackStatuses = TrackStatusEnum;
constructor(
private readonly service: TrackService,
) {
}
}