aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video-actions-dropdown.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-26 10:47:07 +0200
committerChocobozzz <me@florianbigard.com>2019-05-13 09:45:37 +0200
commit743f023c5361af1428e927171effb2616d4e0245 (patch)
tree953146557a0c7bcbc0d1ab8ae9f672a101d1a17d /client/src/app/shared/video/video-actions-dropdown.component.ts
parenta18f275d302bbd95443c258b8d92f6dfd8eb1653 (diff)
downloadPeerTube-743f023c5361af1428e927171effb2616d4e0245.tar.gz
PeerTube-743f023c5361af1428e927171effb2616d4e0245.tar.zst
PeerTube-743f023c5361af1428e927171effb2616d4e0245.zip
Fix videos more dropdown position/loading
Diffstat (limited to 'client/src/app/shared/video/video-actions-dropdown.component.ts')
-rw-r--r--client/src/app/shared/video/video-actions-dropdown.component.ts11
1 files changed, 9 insertions, 2 deletions
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 787ef1188..b2d77a9e6 100644
--- a/client/src/app/shared/video/video-actions-dropdown.component.ts
+++ b/client/src/app/shared/video/video-actions-dropdown.component.ts
@@ -1,4 +1,4 @@
1import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core' 1import { AfterContentInit, AfterViewInit, Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'
2import { I18n } from '@ngx-translate/i18n-polyfill' 2import { I18n } from '@ngx-translate/i18n-polyfill'
3import { DropdownAction, DropdownButtonSize, DropdownDirection } from '@app/shared/buttons/action-dropdown.component' 3import { DropdownAction, DropdownButtonSize, DropdownDirection } from '@app/shared/buttons/action-dropdown.component'
4import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core' 4import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core'
@@ -28,7 +28,7 @@ export type VideoActionsDisplayType = {
28 templateUrl: './video-actions-dropdown.component.html', 28 templateUrl: './video-actions-dropdown.component.html',
29 styleUrls: [ './video-actions-dropdown.component.scss' ] 29 styleUrls: [ './video-actions-dropdown.component.scss' ]
30}) 30})
31export class VideoActionsDropdownComponent implements OnChanges { 31export class VideoActionsDropdownComponent implements AfterViewInit, OnChanges {
32 @ViewChild('playlistDropdown') playlistDropdown: NgbDropdown 32 @ViewChild('playlistDropdown') playlistDropdown: NgbDropdown
33 @ViewChild('playlistAdd') playlistAdd: VideoAddToPlaylistComponent 33 @ViewChild('playlistAdd') playlistAdd: VideoAddToPlaylistComponent
34 34
@@ -78,6 +78,13 @@ export class VideoActionsDropdownComponent implements OnChanges {
78 return this.authService.getUser() 78 return this.authService.getUser()
79 } 79 }
80 80
81 ngAfterViewInit () {
82 // We rely on mouseenter to lazy load actions
83 if (this.screenService.isInTouchScreen()) {
84 this.loadDropdownInformation()
85 }
86 }
87
81 ngOnChanges () { 88 ngOnChanges () {
82 this.buildActions() 89 this.buildActions()
83 } 90 }