realisation de la page user/historique

This commit is contained in:
MiharyR 2021-10-30 16:18:57 +02:00
parent d0ca04aefc
commit e358b6fa0e
18 changed files with 370 additions and 28 deletions

View file

@ -37,13 +37,13 @@
<div *ngFor="let video of playlist.videos ; let i = index" class="videoContainer">
<!-- bouton add -->
<button mat-icon-button (click)="onAdd(video)">
<mat-icon > add_circle </mat-icon>
<mat-icon> add_circle </mat-icon>
</button>
<!-- video -->
<iframe appIframeTracker
[src]=videoUrlService.safeUrl(this.video.url)
allowfullscreen
(iframeClick)="onIframeClick(this.video.url)"></iframe>
(iframeClick)="onIframeClick(this.video)"></iframe>
<!-- bouton delete -->
<button mat-icon-button (click)="onDelete(video, i)">
<mat-icon>delete</mat-icon>

View file

@ -7,6 +7,7 @@ import {AddVideoToPlaylistsService} from "../../../utils/services/addVideoToPlay
import {MessageService} from "../../../utils/services/message/message.service";
import {Playlist} from "../../../utils/interfaces/playlist";
import {MatSnackBar} from "@angular/material/snack-bar";
import {HistoriqueService} from "../../../utils/services/historique/historique.service";
@ -25,7 +26,8 @@ export class VideoListComponent
private fictitiousDatasService: FictitiousDatasService,
public videoUrlService: VideoUrlService,
private addVideoToPlaylistService: AddVideoToPlaylistsService,
private snackBar: MatSnackBar ) { }
private snackBar: MatSnackBar,
private historiqueService: HistoriqueService ) { }
onAdd(video: Video): void
@ -61,9 +63,10 @@ export class VideoListComponent
}
onIframeClick(videoUrl: string): void
onIframeClick(video: Video): void
{
console.log(videoUrl)
console.log("onIframeClick: " + video.title);
this.historiqueService.addVideoToHistoque(video);
}
}