diff --git a/frontend/src/app/components/home/home.component.html b/frontend/src/app/components/home/home.component.html index 952cc1e..f06f187 100644 --- a/frontend/src/app/components/home/home.component.html +++ b/frontend/src/app/components/home/home.component.html @@ -92,5 +92,6 @@ @if (uploadVideoOverview) { } diff --git a/frontend/src/app/components/home/home.component.ts b/frontend/src/app/components/home/home.component.ts index 37b0089..a6b917b 100644 --- a/frontend/src/app/components/home/home.component.ts +++ b/frontend/src/app/components/home/home.component.ts @@ -92,6 +92,14 @@ export class HomeComponent implements OnInit { } } + onVideoUploaded(video: Video) { + this.currentVideo = null; + setTimeout(() => { + this.currentVideo = video; + this.videos.push(video); + }, 1); + } + isWideScreen() { return window.innerWidth > 600; } diff --git a/frontend/src/app/components/home/upload-video/upload-video.component.ts b/frontend/src/app/components/home/upload-video/upload-video.component.ts index 2ad1044..87ec95f 100644 --- a/frontend/src/app/components/home/upload-video/upload-video.component.ts +++ b/frontend/src/app/components/home/upload-video/upload-video.component.ts @@ -5,6 +5,7 @@ import { ErrorService } from '../../../services/error.service'; import { BtnLargeComponent } from '../../../shared/components/buttons/btn-large/btn-large.component'; import { VideoService } from '../../../services/video.service'; import { LoadingDialogComponent } from '../../../shared/components/loading-dialog/loading-dialog.component'; +import { Video } from '../../../interfaces/video.interface'; @Component({ selector: 'app-upload-video', @@ -20,6 +21,7 @@ import { LoadingDialogComponent } from '../../../shared/components/loading-dialo }) export class UploadVideoComponent { @Output() toggleUploadVideoOverview = new EventEmitter(); + @Output() uploadedVideo = new EventEmitter