From 689a4f6946e47ddf4871fd43bbd1284a4dc79e68 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 Dec 2019 09:21:09 +0100 Subject: Pause the video when a modal is opened --- client/src/app/shared/video/video-actions-dropdown.component.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'client/src/app/shared/video/video-actions-dropdown.component.ts') diff --git a/client/src/app/shared/video/video-actions-dropdown.component.ts b/client/src/app/shared/video/video-actions-dropdown.component.ts index 7f3e25d0a..80407098b 100644 --- a/client/src/app/shared/video/video-actions-dropdown.component.ts +++ b/client/src/app/shared/video/video-actions-dropdown.component.ts @@ -57,6 +57,7 @@ export class VideoActionsDropdownComponent implements OnChanges { @Output() videoRemoved = new EventEmitter() @Output() videoUnblacklisted = new EventEmitter() @Output() videoBlacklisted = new EventEmitter() + @Output() modalOpened = new EventEmitter() videoActions: DropdownAction<{ video: Video }>[][] = [] @@ -102,14 +103,20 @@ export class VideoActionsDropdownComponent implements OnChanges { /* Show modals */ showDownloadModal () { + this.modalOpened.emit() + this.videoDownloadModal.show(this.video as VideoDetails) } showReportModal () { + this.modalOpened.emit() + this.videoReportModal.show() } showBlacklistModal () { + this.modalOpened.emit() + this.videoBlacklistModal.show() } @@ -160,6 +167,8 @@ export class VideoActionsDropdownComponent implements OnChanges { } async removeVideo () { + this.modalOpened.emit() + const res = await this.confirmService.confirm(this.i18n('Do you really want to delete this video?'), this.i18n('Delete')) if (res === false) return -- cgit v1.2.3